Re: [PATCH 13/18] exec: make exec path waiting for mmap_sem killable

From: Vlastimil Babka
Date: Fri Mar 11 2016 - 07:51:32 EST


On 02/29/2016 02:26 PM, Michal Hocko wrote:
From: Michal Hocko <mhocko@xxxxxxxx>

setup_arg_pages requires mmap_sem for write. 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. All the callers are already
handling error path and the fatal signal doesn't need any additional
treatment.

The same applies to __bprm_mm_init.

Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Michal Hocko <mhocko@xxxxxxxx>


Acked-by: Vlastimil Babka <vbabka@xxxxxxx>