Skip to content

Commit

Permalink
sh: Fix split ptlock for user mappings in __do_page_fault().
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Sep 27, 2006
1 parent c470662 commit f647d33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/sh/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f647d33

Please sign in to comment.