From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875AbcCKMva (ORCPT ); Fri, 11 Mar 2016 07:51:30 -0500 Received: from mx2.suse.de ([195.135.220.15]:43408 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752716AbcCKMvS (ORCPT ); Fri, 11 Mar 2016 07:51:18 -0500 Subject: Re: [PATCH 13/18] exec: make exec path waiting for mmap_sem killable To: Michal Hocko , LKML References: <1456752417-9626-1-git-send-email-mhocko@kernel.org> <1456752417-9626-14-git-send-email-mhocko@kernel.org> Cc: Andrew Morton , linux-mm@kvack.org, Alex Deucher , Alex Thorlton , Andrea Arcangeli , Andy Lutomirski , Benjamin LaHaise , =?UTF-8?Q?Christian_K=c3=b6nig?= , Daniel Vetter , Dave Hansen , David Airlie , Davidlohr Bueso , David Rientjes , "H . Peter Anvin" , Hugh Dickins , Ingo Molnar , Johannes Weiner , "Kirill A . Shutemov" , Konstantin Khlebnikov , linux-arch@vger.kernel.org, Mel Gorman , Oleg Nesterov , Peter Zijlstra , Petr Cermak , Thomas Gleixner , Michal Hocko , Alexander Viro From: Vlastimil Babka Message-ID: <56E2BF41.1000808@suse.cz> Date: Fri, 11 Mar 2016 13:51:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1456752417-9626-14-git-send-email-mhocko@kernel.org> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/29/2016 02:26 PM, Michal Hocko wrote: > From: Michal Hocko > > 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 > Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka