summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2006-03-23 17:38:10 +1100
committerPaul Mackerras <paulus@samba.org>2006-03-27 14:48:08 +1100
commitaf308377e204e25f1f58627d05fe0f483703b514 (patch)
treebed18644cbf621ecb5447e626e6a0957ab363a46 /arch/powerpc/kernel/process.c
parent7c92943c7b6c42fa631ac2b67aeb507e727cd75b (diff)
downloadtalos-obmc-linux-af308377e204e25f1f58627d05fe0f483703b514.tar.gz
talos-obmc-linux-af308377e204e25f1f58627d05fe0f483703b514.zip
[PATCH] powerpc: fix various sparse warnings
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index f698aa77127e..995b14688d3a 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -362,7 +362,11 @@ static void show_instructions(struct pt_regs *regs)
if (!(i % 8))
printk("\n");
- if (BAD_PC(pc) || __get_user(instr, (unsigned int *)pc)) {
+ /* We use __get_user here *only* to avoid an OOPS on a
+ * bad address because the pc *should* only be a
+ * kernel address.
+ */
+ if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) {
printk("XXXXXXXX ");
} else {
if (regs->nip == pc)
OpenPOWER on IntegriCloud