]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: pagewalk: allow walk_page_range_novma() without mm
authorRolf Eike Beer <eb@emlix.com>
Mon, 22 Aug 2022 13:03:29 +0000 (15:03 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Aug 2022 05:03:25 +0000 (22:03 -0700)
commita2b1fc648bbdccd6d97e337fd37b11e8e17579b5
treed91a141b1a387213d72afdcbb4c44e861225e475
parent25e2d97641619e85ae1b4fec65f2a1f748992249
mm: pagewalk: allow walk_page_range_novma() without mm

Since e47690d756a7 ("x86: mm: avoid allocating struct mm_struct on the
stack") a pgd can be passed to walk_page_range_novma().  In case it is set
no place in the pagewalk code use the walk.mm anymore, so permit to pass a
NULL mm instead.  It is up to the caller to ensure proper locking on the
pgd in this case.

Link: https://lkml.kernel.org/r/5760214.MhkbZ0Pkbq@devpool047
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/pagewalk.c