]> git.baikalelectronics.ru Git - kernel.git/commit
riscv/vdso: make arch_setup_additional_pages wait for mmap_sem for write killable
authorTong Tiangen <tongtiangen@huawei.com>
Wed, 1 Sep 2021 02:46:21 +0000 (02:46 +0000)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Sat, 2 Oct 2021 20:42:26 +0000 (13:42 -0700)
commit8c00b432eb8c6c3f277d8b600cce948c29f3a901
tree5f9303793138d2110c00ce88b1133469a1abf57a
parentea93c4c23f42b4561b6de3d923b0c7c69a26ad7c
riscv/vdso: make arch_setup_additional_pages wait for mmap_sem for write killable

riscv architectures relying on mmap_sem for write in their
arch_setup_additional_pages. If the waiting task gets killed by the oom
killer it would block oom_reaper from asynchronous address space reclaim
and reduce the chances of timely OOM resolving.  Wait for the lock in
the killable mode and return with EINTR if the task got killed while
waiting.

Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Fixes: 280c7b1f39a1 ("RISC-V: Init and Halt Code")
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/vdso.c