Skip to content

Commit

Permalink
mm, gup: fix typo in gup_p4d_range()
Browse files Browse the repository at this point in the history
gup_p4d_range() should call gup_pud_range(), not itself.

[ This was not noticed on x86: this is the HAVE_GENERIC_RCU_GUP code
  used by arm[64] and powerpc    - Linus ]

Fixes: c2febaf ("mm: convert generic code to 5-level paging")
Signed-off-by: Kirill A. Shutemov <[email protected]>
Reported-by: Chris Packham <[email protected]>
Reported-by: Anton Blanchard <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kiryl authored and torvalds committed Mar 13, 2017
1 parent 4495c08 commit ce70df0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ static int gup_p4d_range(pgd_t pgd, unsigned long addr, unsigned long end,
if (!gup_huge_pd(__hugepd(p4d_val(p4d)), addr,
P4D_SHIFT, next, write, pages, nr))
return 0;
} else if (!gup_p4d_range(p4d, addr, next, write, pages, nr))
} else if (!gup_pud_range(p4d, addr, next, write, pages, nr))
return 0;
} while (p4dp++, addr = next, addr != end);

Expand Down

0 comments on commit ce70df0

Please sign in to comment.