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

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>

+4 -3
+4 -3
arch/sh/mm/fault.c
··· 210 210 * are always mapped, whether it be due to legacy behaviour in 211 211 * 29-bit mode, or due to PMB configuration in 32-bit mode. 212 212 */ 213 - if (address >= P3SEG && address < P3_ADDR_MAX) 213 + if (address >= P3SEG && address < P3_ADDR_MAX) { 214 214 pgd = pgd_offset_k(address); 215 - else { 216 - if (unlikely(address >= TASK_SIZE || !current->mm)) 215 + mm = NULL; 216 + } else { 217 + if (unlikely(address >= TASK_SIZE || !(mm = current->mm))) 217 218 return 1; 218 219 219 220 pgd = pgd_offset(current->mm, address);