]> 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>
Mon, 22 Aug 2022 22:58:34 +0000 (15:58 -0700)
commit1d3a5ba1b1f74ec1e7ec25f234a9116546fae1bc
treed835bb9e5745ff2c5cd79392d7a7744a8e2db9eb
parent1839ddaa15c97cb69e649dccfab0054a58a62a05
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