diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2012-08-30 19:26:22 +0200 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2012-09-15 17:34:05 +0200 |
commit | 6d1d8dfa8b65831cfa9a528e3d17efa7e7f4226c (patch) | |
tree | 2e13b65228f1c879bee978acc35ec7f6755f7ba5 /kernel/events | |
parent | ded86e7c8fc4404414c4700010c9962ea8bd083a (diff) |
uprobes: Don't put NULL pointer in uprobe_register()
alloc_uprobe() might return a NULL pointer, put_uprobe() can't deal with
this.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/uprobes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 1666632e6edf..336f06948de1 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -897,7 +897,8 @@ int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer * } mutex_unlock(uprobes_hash(inode)); - put_uprobe(uprobe); + if (uprobe) + put_uprobe(uprobe); return ret; } |