[FIX] dbi_register_kprobe
authorAnastasia Lyupa <a.lyupa@samsung.com>
Mon, 16 Dec 2013 10:05:33 +0000 (14:05 +0400)
committerAnastasia Lyupa <a.lyupa@samsung.com>
Mon, 16 Dec 2013 13:10:10 +0000 (17:10 +0400)
don't return -EINVAL, when symbol_name and addr are set
at the same time, use symbol_name to update addr

Change-Id: I5129ceb6408e0be87e078e13b9593bb9895228ca
Signed-off-by: Anastasia Lyupa <a.lyupa@samsung.com>
kprobe/dbi_kprobes.c

index 0710e28..40ee61b 100644 (file)
@@ -504,11 +504,8 @@ int dbi_register_kprobe(struct kprobe *p)
         * 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->addr)
-                       return -EINVAL;
+       if (p->symbol_name)
                p->addr = (kprobe_opcode_t *)swap_ksyms(p->symbol_name);
-       }
 
        if (!p->addr)
                return -EINVAL;