From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754199AbcB2SXG (ORCPT ); Mon, 29 Feb 2016 13:23:06 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35390 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753390AbcB2SW6 (ORCPT ); Mon, 29 Feb 2016 13:22:58 -0500 Date: Mon, 29 Feb 2016 19:22:56 +0100 From: Michal Hocko To: Oleg Nesterov Cc: LKML , Andrew Morton , linux-mm@kvack.org Subject: Re: [PATCH] uprobes: wait for mmap_sem for write killable Message-ID: <20160229182256.GQ16930@dhcp22.suse.cz> References: <1456752417-9626-16-git-send-email-mhocko@kernel.org> <1456767743-18665-1-git-send-email-mhocko@kernel.org> <20160229181105.GG3615@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160229181105.GG3615@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 29-02-16 19:11:06, Oleg Nesterov wrote: > On 02/29, Michal Hocko wrote: > > > > --- a/kernel/events/uprobes.c > > +++ b/kernel/events/uprobes.c > > @@ -1130,7 +1130,9 @@ static int xol_add_vma(struct mm_struct *mm, struct xol_area *area) > > struct vm_area_struct *vma; > > int ret; > > > > - down_write(&mm->mmap_sem); > > + if (down_write_killable(&mm->mmap_sem)) > > + return -EINTR; > > + > > if (mm->uprobes_state.xol_area) { > > ret = -EALREADY; > > goto fail; > > @@ -1468,7 +1470,8 @@ static void dup_xol_work(struct callback_head *work) > > if (current->flags & PF_EXITING) > > return; > > > > - if (!__create_xol_area(current->utask->dup_xol_addr)) > > + if (!__create_xol_area(current->utask->dup_xol_addr) && > > + !fatal_signal_pending(current) > > uprobe_warn(current, "dup xol area"); > > } > > Looks good, thanks. Can I consider this your Acked-by? -- Michal Hocko SUSE Labs