projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ded86e7
)
uprobes: Don't put NULL pointer in uprobe_register()
author
Sebastian Andrzej Siewior
<bigeasy@linutronix.de>
Thu, 30 Aug 2012 17:26:22 +0000
(19:26 +0200)
committer
Oleg Nesterov
<oleg@redhat.com>
Sat, 15 Sep 2012 15:34:05 +0000
(17:34 +0200)
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>
kernel/events/uprobes.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/events/uprobes.c
b/kernel/events/uprobes.c
index 1666632e6edfcfc07c867c91d5b7039dc84ce2f6..336f06948de136c355c321ad09b91e1533f3ed8b 100644
(file)
--- 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;
}