From 107827693a83a0da2e766879072eb32ea05c8780 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 17 Oct 2011 18:00:45 -0700 Subject: [PATCH] --- yaml --- r: 269104 b: refs/heads/master c: db45bd90be200692342a340e84354c26ca9e424c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/kprobes.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 5e144b07b812..2b474a049a57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 47724df3375bf0cf652039ab6b7ded29fe877de6 +refs/heads/master: db45bd90be200692342a340e84354c26ca9e424c diff --git a/trunk/arch/x86/kernel/kprobes.c b/trunk/arch/x86/kernel/kprobes.c index f1a6244d7d93..c0ed3d9c3b22 100644 --- a/trunk/arch/x86/kernel/kprobes.c +++ b/trunk/arch/x86/kernel/kprobes.c @@ -75,8 +75,10 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); /* * Undefined/reserved opcodes, conditional jump, Opcode Extension * Groups, and some special opcodes can not boost. + * This is volatile to keep gcc from statically optimizing it out, as + * variable_test_bit makes gcc think only *(unsigned long*) is used. */ -static const u32 twobyte_is_boostable[256 / 32] = { +static volatile const u32 twobyte_is_boostable[256 / 32] = { /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ /* ---------------------------------------------- */ W(0x00, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0) | /* 00 */