[S390] kprobes: defer setting of ctlblk state
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 22 Jun 2009 10:08:23 +0000 (12:08 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 22 Jun 2009 10:08:24 +0000 (12:08 +0200)
commitacf018004f76617dbab36ef4b5480d4351f9cdff
treea4f3da66d0f4518d99e9eeb5fd4efc944d9b4d92
parent12310e9c1b9a53896e4df0459039dd125f62aa9b
[S390] kprobes: defer setting of ctlblk state

get_krobe_ctlblk returns a per cpu kprobe control block which holds
the state of the current cpu wrt to kprobe.
When inserting/removing a kprobe the state of the cpu which replaces
the code is changed to KPROBE_SWAP_INST. This however is done when
preemption is still enabled. So the state of the current cpu doesn't
necessarily reflect the real state.
To fix this move the code that changes the state to non-preemptible
context.

Reported-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/kprobes.c