RISC-V: Acquire mmap lock before invoking walk_page_range
authorAtish Patra <atish.patra@wdc.com>
Wed, 17 Jun 2020 20:37:32 +0000 (13:37 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 19 Jun 2020 01:46:09 +0000 (18:46 -0700)
commit0e2c09011d4de4161f615ff860a605a9186cf62a
treeb282cc26e2b2bd69ffc29280535664da6056606f
parente0d17c842c0f824fd4df9f4688709fc6907201e1
RISC-V: Acquire mmap lock before invoking walk_page_range

As per walk_page_range documentation, mmap lock should be acquired by the
caller before invoking walk_page_range. mmap_assert_locked gets triggered
without that. The details can be found here.

http://lists.infradead.org/pipermail/linux-riscv/2020-June/010335.html

Fixes: 395a21ff859c(riscv: add ARCH_HAS_SET_DIRECT_MAP support)
Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Michel Lespinasse <walken@google.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/pageattr.c