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