projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b64b9c9
)
uprobes: Don't return success if alloc_uprobe() fails
author
Oleg Nesterov
<oleg@redhat.com>
Sun, 30 Sep 2012 16:21:09 +0000
(18:21 +0200)
committer
Oleg Nesterov
<oleg@redhat.com>
Sun, 7 Oct 2012 19:19:41 +0000
(21:19 +0200)
If alloc_uprobe() fails uprobe_register() should return ENOMEM, not 0.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
kernel/events/uprobes.c
patch
|
blob
|
history
diff --git
a/kernel/events/uprobes.c
b/kernel/events/uprobes.c
index
6136854
..
588a557
100644
(file)
--- a/
kernel/events/uprobes.c
+++ b/
kernel/events/uprobes.c
@@
-813,7
+813,9
@@
int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *
mutex_lock(uprobes_hash(inode));
uprobe = alloc_uprobe(inode, offset);
- if (uprobe && !consumer_add(uprobe, uc)) {
+ if (!uprobe) {
+ ret = -ENOMEM;
+ } else if (!consumer_add(uprobe, uc)) {
ret = __uprobe_register(uprobe);
if (ret) {
uprobe->consumers = NULL;