Skip to content

Commit ea3f827

Browse files
committed
parisc: fix expand_stack() conversion
In commit 8d7071a ("mm: always expand the stack with the mmap write lock held") I tried to deal with the remaining odd page fault handling cases. The oddest one is ia64, which has stacks that grow both up and down. And because ia64 was _so_ odd, I asked people to verify the end result. But a close second oddity is parisc, which is the only one that has a main stack growing up (our "CONFIG_STACK_GROWSUP" config option). But it looked obvious enough that I didn't worry about it. I should have worried a bit more. Not because it was particularly complex, but because I just used the wrong variable name. The previous vma isn't called "prev", it's called "prev_vma". Blush. Fixes: 8d7071a ("mm: always expand the stack with the mmap write lock held") Signed-off-by: Linus Torvalds <[email protected]>
1 parent 1e6d5de commit ea3f827

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/parisc/mm/fault.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,
289289
mmap_read_lock(mm);
290290
vma = find_vma_prev(mm, address, &prev_vma);
291291
if (!vma || address < vma->vm_start) {
292-
if (!prev || !(prev->vm_flags & VM_GROWSUP))
292+
if (!prev_vma || !(prev_vma->vm_flags & VM_GROWSUP))
293293
goto bad_area;
294294
vma = expand_stack(mm, address);
295295
if (!vma)

0 commit comments

Comments
 (0)