[PATCH] Kprobes: preempt_disable/enable() simplification

Reorganize the preempt_disable/enable calls to eliminate the extra preempt
depth.  Changes based on Paul McKenney's review suggestions for the kprobes
RCU changeset.

Signed-off-by: Ananth N Mavinakayanahalli <[email protected]>
Signed-off-by: Anil S Keshavamurthy <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Ananth N Mavinakayanahalli 2005-11-07 01:00:14 -08:00 • committed by Linus Torvalds
commit d217d5450f
7 changed files with 80 additions and 61 deletions

View file

@ -167,7 +167,7 @@ static inline void reset_kprobe_instance(void)
* This routine is called either:
* - under the kprobe_lock spinlock - during kprobe_[un]register()
* OR
* - under an rcu_read_lock() - from arch/xxx/kernel/kprobes.c
* - with preemption disabled - from arch/xxx/kernel/kprobes.c
*/
struct kprobe __kprobes *get_kprobe(void *addr)
{