]> git.baikalelectronics.ru Git - kernel.git/commit
vdso: make arch_setup_additional_pages wait for mmap_sem for write killable
authorMichal Hocko <mhocko@suse.com>
Mon, 23 May 2016 23:25:54 +0000 (16:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 May 2016 00:04:14 +0000 (17:04 -0700)
commitab7160e7bb1403327fc562d8f2c4af6e1e5e8a33
tree7eba1558fe80c2d1de46f5d2f7cad404dc7da5ee
parentb09593ab486b32626d984a3264684ef4f69b0f74
vdso: make arch_setup_additional_pages wait for mmap_sem for write killable

most architectures are 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: Michal Hocko <mhocko@suse.com>
Acked-by: Andy Lutomirski <luto@amacapital.net> [x86 vdso]
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/kernel/process.c
arch/arm64/kernel/vdso.c
arch/hexagon/kernel/vdso.c
arch/mips/kernel/vdso.c
arch/powerpc/kernel/vdso.c
arch/s390/kernel/vdso.c
arch/sh/kernel/vsyscall/vsyscall.c
arch/x86/entry/vdso/vma.c
arch/x86/um/vdso/vma.c