OSDN Git Service

kprobes: adjust "fix a memory leak in function pre_handler_kretprobe()"
authorJan Beulich <JBeulich@suse.com>
Tue, 28 Feb 2012 10:41:37 +0000 (10:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Mar 2012 17:32:57 +0000 (10:32 -0700)
3.0.21's 603b63484725a6e88e4ae5da58716efd88154b1e directly used
the upstream patch, yet kprobes locking in 3.0.x uses spin_lock...()
rather than raw_spin_lock...().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/kprobes.c

index 749340c..f1dcde4 100644 (file)
@@ -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)) {
-                       raw_spin_lock_irqsave(&rp->lock, flags);
+                       spin_lock_irqsave(&rp->lock, flags);
                        hlist_add_head(&ri->hlist, &rp->free_instances);
-                       raw_spin_unlock_irqrestore(&rp->lock, flags);
+                       spin_unlock_irqrestore(&rp->lock, flags);
                        return 0;
                }