}
}
-void arch_kprobe_flush_task(struct task_struct *tk, spinlock_t *kp_lock)
+void arch_kprobe_flush_task(struct task_struct *tk)
{
- unsigned long flags = 0;
struct kretprobe_instance *ri;
- spin_lock_irqsave(kp_lock, flags);
while ((ri = get_rp_inst_tsk(tk)) != NULL) {
*((unsigned long *)(ri->stack_addr)) =
(unsigned long) ri->ret_addr;
recycle_rp_inst(ri);
}
- spin_unlock_irqrestore(kp_lock, flags);
}
/*
#include <linux/list.h>
#include <linux/notifier.h>
#include <linux/smp.h>
-#include <linux/spinlock.h>
#include <asm/kprobes.h>
unsigned long flags);
extern struct task_struct *arch_get_kprobe_task(void *ptr);
extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs);
-extern void arch_kprobe_flush_task(struct task_struct *tk, spinlock_t *kp_lock);
+extern void arch_kprobe_flush_task(struct task_struct *tk);
#else /* ARCH_SUPPORTS_KRETPROBES */
static inline void kretprobe_trampoline(void)
{
*/
void kprobe_flush_task(struct task_struct *tk)
{
- arch_kprobe_flush_task(tk, &kprobe_lock);
+ unsigned long flags = 0;
+ spin_lock_irqsave(&kprobe_lock, flags);
+ arch_kprobe_flush_task(tk);
+ spin_unlock_irqrestore(&kprobe_lock, flags);
}
/*