diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 15:30:24 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 15:30:24 +0900 |
commit | f647d33f879d258de4ab2559975bd6eebda2033e (patch) | |
tree | 15364f27dea1203004ae7016c676332032c17a7d /arch | |
parent | c470662854ff94d44bf8c192cefac3efa33db676 (diff) | |
download | op-kernel-dev-f647d33f879d258de4ab2559975bd6eebda2033e.zip op-kernel-dev-f647d33f879d258de4ab2559975bd6eebda2033e.tar.gz |
sh: Fix split ptlock for user mappings in __do_page_fault().
There was a bug that got introduced when the split ptlock changes
went in where mm could be unintialized for user mappings, this
fixes it up..
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/mm/fault.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index 7a03ffe..dc461d2 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c @@ -210,10 +210,11 @@ asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess, * are always mapped, whether it be due to legacy behaviour in * 29-bit mode, or due to PMB configuration in 32-bit mode. */ - if (address >= P3SEG && address < P3_ADDR_MAX) + if (address >= P3SEG && address < P3_ADDR_MAX) { pgd = pgd_offset_k(address); - else { - if (unlikely(address >= TASK_SIZE || !current->mm)) + mm = NULL; + } else { + if (unlikely(address >= TASK_SIZE || !(mm = current->mm))) return 1; pgd = pgd_offset(current->mm, address); |