OSDN Git Service

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)
commit8bb0ab3ae7a4dbe6cf32deb830cf2bdbf5736867
tree5f9303793138d2110c00ce88b1133469a1abf57a
parent78a743cd82a35ca0724179fc22834f06a2151fc2
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: 76d2a0493a17 ("RISC-V: Init and Halt Code")
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/kernel/vdso.c