set NULL addr in struct kprobe during unregistering if
symbol_name is set to make the struct reusable
(because we can't use symbol_name and addr to register kprobe
at the same time)
this commit reverts
commit
7ddb6434a343f484e3e0b2f1b720e77753e32800,
it solves the same problem in the other way
Change-Id: Ifac85e1f416c0c053711a0e5dd283c019c461097
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
* and add it to the address. That way the addr
* field can either be global or relative to a symbol.
*/
- if (p->symbol_name)
+ if (p->symbol_name) {
+ if (p->addr)
+ return -EINVAL;
p->addr = (kprobe_opcode_t *)swap_ksyms(p->symbol_name);
+ }
if (!p->addr)
return -EINVAL;
old_p->post_handler = NULL;
}
}
+ /* Set NULL addr for reusability if symbol_name is used */
+ if (p->symbol_name)
+ p->addr = NULL;
}
int dbi_register_jprobe(struct jprobe *jp)