From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f200.google.com (mail-wr0-f200.google.com [209.85.128.200]) by kanga.kvack.org (Postfix) with ESMTP id 2B9B2280394 for ; Thu, 3 Aug 2017 13:24:55 -0400 (EDT) Received: by mail-wr0-f200.google.com with SMTP id z53so2800641wrz.10 for ; Thu, 03 Aug 2017 10:24:55 -0700 (PDT) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id 20si1657844wma.1.2017.08.03.10.24.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 10:24:53 -0700 (PDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v73HO3sJ057335 for ; Thu, 3 Aug 2017 13:24:52 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2c46b4exmk-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 03 Aug 2017 13:24:52 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 Aug 2017 18:24:50 +0100 Date: Thu, 3 Aug 2017 20:24:43 +0300 From: Mike Rapoport Subject: Re: [PATCH] userfaultfd_zeropage: return -ENOSPC in case mm has gone References: <1501136819-21857-1-git-send-email-rppt@linux.vnet.ibm.com> <20170731122204.GB4878@dhcp22.suse.cz> <20170731133247.GK29716@redhat.com> <20170731134507.GC4829@dhcp22.suse.cz> <20170802123440.GD17905@rapoport-lnx> <20170802155522.GB21775@redhat.com> <20170802162248.GA3476@dhcp22.suse.cz> <20170802164001.GF21775@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170802164001.GF21775@redhat.com> Message-Id: <20170803172442.GA1026@rapoport-lnx> Sender: owner-linux-mm@kvack.org List-ID: To: Andrea Arcangeli Cc: Michal Hocko , Andrew Morton , "Dr. David Alan Gilbert" , Pavel Emelyanov , linux-mm , lkml , stable@vger.kernel.org On Wed, Aug 02, 2017 at 06:40:01PM +0200, Andrea Arcangeli wrote: > On Wed, Aug 02, 2017 at 06:22:49PM +0200, Michal Hocko wrote: > > ESRCH refers to "no such process". Strictly speaking userfaultfd code is > > about a mm which is gone but that is a mere detail. In fact the owner of > > Well this whole issue about which retval, is about a mere detail in > the first place, so I don't think you can discount all other mere > details as irrelevant in the evaluation of a change to solve a mere > detail. > > > But as I've said, this might be really risky to change. My impression > > was that userfaultfd is not widely used yet and those can be fixed > > easily but if that is not the case then we have to live with the current > > ENOSPC. > > The only change would be for userfaultfd non cooperative mode, and > CRIU is the main user of that. So I think it is up to Mike to decide, > I'm fine either ways. I certainly agree ESRCH could be a slightly > better fit, I only wanted to clarify it's not a 100% match either. I'm Ok with updating the code and the man page as long as Michal takes the blame if anything but CRIU breaks :) Now, seriously, I believe there are not many users of non-cooperative uffd if at all and it is very unlikely anybody has it in production. I'll send a patch with s/ENOSPC/ESRCH in the next few days. -- Sincerely yours, Mike. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org