summaryrefslogtreecommitdiffstats
path: root/kernel/kprobes.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-22 12:17:26 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-22 12:17:26 +0100
commitf9b44121b34174ae4f243a568393fc3225842e75 (patch)
tree943f68cd7458d08a9e8809ed0a10b71b23911f3e /kernel/kprobes.c
parentASoC: pxa-pcm-lib: initialize DMA channel to -1 (diff)
parentLinux 2.6.34-rc2 (diff)
downloadlinux-f9b44121b34174ae4f243a568393fc3225842e75.tar.xz
linux-f9b44121b34174ae4f243a568393fc3225842e75.zip
Merge commit 'v2.6.34-rc2' into for-2.6.34
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r--kernel/kprobes.c3
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,
struct kprobe_insn_page *kip;
list_for_each_entry(kip, &c->pages, list) {
- long idx = ((long)slot - (long)kip->insns) / c->insn_size;
+ long idx = ((long)slot - (long)kip->insns) /
+ (c->insn_size * sizeof(kprobe_opcode_t));
if (idx >= 0 && idx < slots_per_page(c)) {
WARN_ON(kip->slot_used[idx] != SLOT_USED);
if (dirty) {