]> git.hungrycats.org Git - linux/commitdiff
ppc64: use get_user in alignment exception handler
authorAnton Blanchard <anton@samba.org>
Sun, 16 Feb 2003 01:55:42 +0000 (12:55 +1100)
committerAnton Blanchard <anton@samba.org>
Sun, 16 Feb 2003 01:55:42 +0000 (12:55 +1100)
arch/ppc64/kernel/align.c

index 2828e55fbb54e40917a93cf3480df34c17234c9b..603bf39493631180e95b99e5af70f08cdc74da5a 100644 (file)
@@ -237,8 +237,12 @@ fix_alignment(struct pt_regs *regs)
        dsisr = regs->dsisr;
 
        /* Power4 doesn't set DSISR for an alignment interrupt */
-       if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p))
-               dsisr = make_dsisr( *((unsigned *)regs->nip) );
+       if (__is_processor(PV_POWER4) || __is_processor(PV_POWER4p)) {
+               unsigned int real_instr;
+               if (__get_user(real_instr, (unsigned int *)regs->nip))
+                       return 0;
+               dsisr = make_dsisr(real_instr);
+       }
 
        /* extract the operation and registers from the dsisr */
        reg = (dsisr >> 5) & 0x1f;      /* source/dest register */