diff options
-rw-r--r-- | kernel/kprobes.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 283c8b01ce78..26ae92c12fc2 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1972,6 +1972,10 @@ int register_kretprobe(struct kretprobe *rp) if (!kprobe_on_func_entry(rp->kp.addr, rp->kp.symbol_name, rp->kp.offset)) return -EINVAL; + /* If only rp->kp.addr is specified, check reregistering kprobes */ + if (rp->kp.addr && check_kprobe_rereg(&rp->kp)) + return -EINVAL; + if (kretprobe_blacklist_size) { addr = kprobe_addr(&rp->kp); if (IS_ERR(addr)) |