--- zzzz-none-000/linux-2.6.19.2/arch/ppc/kernel/traps.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/arch/ppc/kernel/traps.c 2007-01-11 07:38:19.000000000 +0000 @@ -708,7 +708,7 @@ void alignment_exception(struct pt_regs *regs) { - int sig, code, fixed = 0; + int fixed; fixed = fix_alignment(regs); if (fixed == 1) { @@ -717,16 +717,14 @@ return; } if (fixed == -EFAULT) { - sig = SIGSEGV; - code = SEGV_ACCERR; - } else { - sig = SIGBUS; - code = BUS_ADRALN; + /* fixed == -EFAULT means the operand address was bad */ + if (user_mode(regs)) + _exception(SIGSEGV, regs, SEGV_ACCERR, regs->dar); + else + bad_page_fault(regs, regs->dar, SIGSEGV); + return; } - if (user_mode(regs)) - _exception(sig, regs, code, regs->dar); - else - bad_page_fault(regs, regs->dar, sig); + _exception(SIGBUS, regs, BUS_ADRALN, regs->dar); } void StackOverflow(struct pt_regs *regs)