diff options
author | Helge Deller <deller@gmx.de> | 2017-06-08 22:06:54 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2017-06-09 11:34:53 +0200 |
commit | b752c7b20709e0ecee0f7d4ef6ef82fcc27408b6 (patch) | |
tree | a0f2fb9d866aaab13ece90dbef2872925295cd8c /arch/parisc/mm | |
parent | 649aa24254e85bf6bd7807dd372d083707852b1f (diff) | |
download | op-kernel-dev-b752c7b20709e0ecee0f7d4ef6ef82fcc27408b6.zip op-kernel-dev-b752c7b20709e0ecee0f7d4ef6ef82fcc27408b6.tar.gz |
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>
Diffstat (limited to 'arch/parisc/mm')
-rw-r--r-- | arch/parisc/mm/fault.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index fdc34cf..41448f7 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c @@ -154,6 +154,7 @@ int fixup_exception(struct pt_regs *regs) /* zero target register for get_user() */ if (parisc_acctyp(0, regs->iir) == VM_READ) { int treg = regs->iir & 0x1f; + BUG_ON(treg == 0); regs->gr[treg] = 0; } } |