Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2932
b: refs/heads/master
c: 0aa55e4
h: refs/heads/master
v: v3
  • Loading branch information
Hien Nguyen authored and Linus Torvalds committed Jun 23, 2005
1 parent 97b0ba0 commit c230de4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e1048b11c5afe79aac46a42e3ccec86b8365c6d
refs/heads/master: 0aa55e4d7db822059fe8132fe9f2b7773c48216c
5 changes: 1 addition & 4 deletions trunk/arch/i386/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,14 @@ void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs)
}
}

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);
}

/*
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/linux/kprobes.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <linux/list.h>
#include <linux/notifier.h>
#include <linux/smp.h>
#include <linux/spinlock.h>

#include <asm/kprobes.h>

Expand Down Expand Up @@ -101,7 +100,7 @@ extern void trampoline_post_handler(struct kprobe *p, struct pt_regs *regs,
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)
{
Expand Down
5 changes: 4 additions & 1 deletion trunk/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ struct kretprobe_instance *get_rp_inst_tsk(struct task_struct *tk)
*/
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);
}

/*
Expand Down

0 comments on commit c230de4

Please sign in to comment.