diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-25 08:41:09 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-25 08:46:20 +0200 |
commit | 2c78ffeca98fcd5a1dfd4a322438944506ed5e64 (patch) | |
tree | 37a7a9a024a8342828307ca1bcd1c447fbee270a /kernel/kprobes.c | |
parent | aa7b250c252cc8e6b1daf0e1eada5eba42a1a68d (diff) | |
download | op-kernel-dev-2c78ffeca98fcd5a1dfd4a322438944506ed5e64.zip op-kernel-dev-2c78ffeca98fcd5a1dfd4a322438944506ed5e64.tar.gz |
x86/oprofile: Fix uninitialized variable use in debug printk
Stephen Rothwell reported this build warning:
arch/x86/oprofile/op_model_amd.c: In function 'ibs_eilvt_valid':
arch/x86/oprofile/op_model_amd.c:289: warning: 'offset' may be used uninitialized in this function
And correctly observed that indeed the variable is used uninitialized in
this function. The result of this bug can be a debug printk with a bogus
value.
Also fix a few more small details that made this function hard to read
and which probably contributed to the bug being introduced to begin with:
- Use more symmetric error conditions
- Remove the !0 obfuscation
- Add newlines to the printk output
- Remove bogus linebreaks in printk strings and elsewhere
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20101025115736.41d51abe.sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/kprobes.c')
0 files changed, 0 insertions, 0 deletions