[PATCH RT 1/2] Revert "kprobes: adjust "fix a memory leak in functionpre_handler_kretprobe()""
From: Steven Rostedt
Date: Wed Mar 21 2012 - 16:13:12 EST
From: Steven Rostedt <srostedt@xxxxxxxxxx>
This reverts commit b8a0040ef7112439ad2efac6f1a79aa842b5924f.
As pointed out by John Kacur, the patch breaks 3.0-rt.
Because rt pulls in 7b8d0e5, the above fix which comes from v3.0.24
should not be applied. kretprobe is a raw_spinlock_t for real-time.
Before the revert we get the following compile errors
kernel/kprobes.c:1664: warning: passing argument 1 of 'rt_spin_lock' from incompatible pointer type
kernel/kprobes.c:1666: warning: passing argument 1 of 'rt_spin_unlock' from incompatible pointer type
Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
kernel/kprobes.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index a7dcf06..9cdbf26 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1661,9 +1661,9 @@ static int __kprobes pre_handler_kretprobe(struct kprobe *p,
ri->task = current;
if (rp->entry_handler && rp->entry_handler(ri, regs)) {
- spin_lock_irqsave(&rp->lock, flags);
+ raw_spin_lock_irqsave(&rp->lock, flags);
hlist_add_head(&ri->hlist, &rp->free_instances);
- spin_unlock_irqrestore(&rp->lock, flags);
+ raw_spin_unlock_irqrestore(&rp->lock, flags);
return 0;
}
--
1.7.8.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/