From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH 15/18] uprobes: wait for mmap_sem for write killable Date: Mon, 29 Feb 2016 18:12:11 +0100 Message-ID: <20160229171211.GA3615@redhat.com> References: <1456752417-9626-1-git-send-email-mhocko@kernel.org> <1456752417-9626-16-git-send-email-mhocko@kernel.org> <20160229155712.GA1964@redhat.com> <20160229162840.GH16930@dhcp22.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49163 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750947AbcB2RMU (ORCPT ); Mon, 29 Feb 2016 12:12:20 -0500 Content-Disposition: inline In-Reply-To: <20160229162840.GH16930@dhcp22.suse.cz> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Michal Hocko Cc: LKML , Andrew Morton , linux-mm@kvack.org, Alex Deucher , Alex Thorlton , Andrea Arcangeli , Andy Lutomirski , Benjamin LaHaise , Christian =?iso-8859-1?Q?K=F6nig?= , 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 , Peter Zijlstra On 02/29, Michal Hocko wrote: > > Ahh, I see. I didn't understand what is the purpose of the warning. Does > the following work for you? > --- > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c > index a79315d0f711..fb4a6bcc88ce 100644 > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -1470,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"); > } Yes, I think this is fine. Probably deserves a cleanup, but we can do it later. Oleg. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:49163 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750947AbcB2RMU (ORCPT ); Mon, 29 Feb 2016 12:12:20 -0500 Date: Mon, 29 Feb 2016 18:12:11 +0100 From: Oleg Nesterov Subject: Re: [PATCH 15/18] uprobes: wait for mmap_sem for write killable Message-ID: <20160229171211.GA3615@redhat.com> References: <1456752417-9626-1-git-send-email-mhocko@kernel.org> <1456752417-9626-16-git-send-email-mhocko@kernel.org> <20160229155712.GA1964@redhat.com> <20160229162840.GH16930@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160229162840.GH16930@dhcp22.suse.cz> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Michal Hocko Cc: LKML , Andrew Morton , linux-mm@kvack.org, Alex Deucher , Alex Thorlton , Andrea Arcangeli , Andy Lutomirski , Benjamin LaHaise , Christian =?iso-8859-1?Q?K=F6nig?= , 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 , Peter Zijlstra , Petr Cermak , Thomas Gleixner Message-ID: <20160229171211.s7POsn3Pa4muBokoVRd5gjbvbPuepurfKlPqagLCgA8@z> On 02/29, Michal Hocko wrote: > > Ahh, I see. I didn't understand what is the purpose of the warning. Does > the following work for you? > --- > diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c > index a79315d0f711..fb4a6bcc88ce 100644 > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -1470,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"); > } Yes, I think this is fine. Probably deserves a cleanup, but we can do it later. Oleg.