Commit 3573026a authored by David S. Miller's avatar David S. Miller

[KPROBES]: Pass integer addresses, not pointers, to flush_icache_range().

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3df3468
...@@ -88,7 +88,8 @@ int register_kprobe(struct kprobe *p) ...@@ -88,7 +88,8 @@ int register_kprobe(struct kprobe *p)
arch_prepare_kprobe(p); arch_prepare_kprobe(p);
p->opcode = *p->addr; p->opcode = *p->addr;
*p->addr = BREAKPOINT_INSTRUCTION; *p->addr = BREAKPOINT_INSTRUCTION;
flush_icache_range(p->addr, p->addr + sizeof(kprobe_opcode_t)); flush_icache_range((unsigned long) p->addr,
(unsigned long) p->addr + sizeof(kprobe_opcode_t));
out: out:
spin_unlock_irqrestore(&kprobe_lock, flags); spin_unlock_irqrestore(&kprobe_lock, flags);
return ret; return ret;
...@@ -100,7 +101,8 @@ void unregister_kprobe(struct kprobe *p) ...@@ -100,7 +101,8 @@ void unregister_kprobe(struct kprobe *p)
spin_lock_irqsave(&kprobe_lock, flags); spin_lock_irqsave(&kprobe_lock, flags);
*p->addr = p->opcode; *p->addr = p->opcode;
hlist_del(&p->hlist); hlist_del(&p->hlist);
flush_icache_range(p->addr, p->addr + sizeof(kprobe_opcode_t)); flush_icache_range((unsigned long) p->addr,
(unsigned long) p->addr + sizeof(kprobe_opcode_t));
spin_unlock_irqrestore(&kprobe_lock, flags); spin_unlock_irqrestore(&kprobe_lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment