From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752112AbcB2SjB (ORCPT ); Mon, 29 Feb 2016 13:39:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50050 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750860AbcB2Si7 (ORCPT ); Mon, 29 Feb 2016 13:38:59 -0500 Date: Mon, 29 Feb 2016 19:38:56 +0100 From: Oleg Nesterov To: Michal Hocko Cc: LKML , Andrew Morton , linux-mm@kvack.org Subject: Re: [PATCH] uprobes: wait for mmap_sem for write killable Message-ID: <20160229183856.GA3869@redhat.com> References: <1456752417-9626-16-git-send-email-mhocko@kernel.org> <1456767743-18665-1-git-send-email-mhocko@kernel.org> <20160229181105.GG3615@redhat.com> <20160229182256.GQ16930@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160229182256.GQ16930@dhcp22.suse.cz> 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 02/29, Michal Hocko wrote: > > 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? Yes, feel free to add. I forgot to add it. Oleg.