diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kprobes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index fa034d29cf73..0ed46f3e51e9 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -259,7 +259,8 @@ static void __kprobes __free_insn_slot(struct kprobe_insn_cache *c, | |||
259 | struct kprobe_insn_page *kip; | 259 | struct kprobe_insn_page *kip; |
260 | 260 | ||
261 | list_for_each_entry(kip, &c->pages, list) { | 261 | list_for_each_entry(kip, &c->pages, list) { |
262 | long idx = ((long)slot - (long)kip->insns) / c->insn_size; | 262 | long idx = ((long)slot - (long)kip->insns) / |
263 | (c->insn_size * sizeof(kprobe_opcode_t)); | ||
263 | if (idx >= 0 && idx < slots_per_page(c)) { | 264 | if (idx >= 0 && idx < slots_per_page(c)) { |
264 | WARN_ON(kip->slot_used[idx] != SLOT_USED); | 265 | WARN_ON(kip->slot_used[idx] != SLOT_USED); |
265 | if (dirty) { | 266 | if (dirty) { |