Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parisc: Avoid zeroing gr[0] in fixup_exception()

Register gr[0] holds the PSW in interrupt context. It's absolutely
unlikely that the compiler will use register zero in a get_user() call,
but better BUG on such a case in fixup_exception() anyway.

Signed-off-by: Helge Deller <deller@gmx.de>

+1
+1
arch/parisc/mm/fault.c
··· 154 154 /* zero target register for get_user() */ 155 155 if (parisc_acctyp(0, regs->iir) == VM_READ) { 156 156 int treg = regs->iir & 0x1f; 157 + BUG_ON(treg == 0); 157 158 regs->gr[treg] = 0; 158 159 } 159 160 }