Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1147353ybh; Sun, 19 Jul 2020 09:58:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJG3SbsOeWlY+8o5Ma2Ag8t3bxvxrzxsXlGIr8RBgW5UXsfb6H1x2Ux5sWKPvN2CoW4U+f X-Received: by 2002:a17:906:1c5b:: with SMTP id l27mr16837568ejg.188.1595177905364; Sun, 19 Jul 2020 09:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595177905; cv=none; d=google.com; s=arc-20160816; b=r/+hLx3nW29DCvqCLt9lf/6nMqafpeCKzH26ChCV55OhAXQh9+2YhYsIrZLZVzFHwx 6Ysy7pPcObEWv3BRoGoo+sz4Nd95/H9EVw8JSIMHrLWy9lGwqwmbbpCUgWTwEVJPJyx0 ZXmstjumL5wEIOb8123o7uzNhi0knIOOAAT5We8ffnJiKDmoiBDKdK+Y96aQ388zjvAr QqxP8RqIokXFMGL49LVdGT4l4lGXOpIh3Q3uR0L8w+abDsllESK7olrVpyCvLmPdBEQu tRqd7buiIFgfFuoziXycBirC69n1R9Ys/HRE4Xz7s0FgIivwtFA2cEdc8f2IZwBnEXcj 3xtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=XaA+cIq/BB7h+L9fniqz/6X4X72gBlIjuOEyTs2JPVQ=; b=jrnf0PZHlOJbET5GRnTx578S9Kc5uy9ql2JAJP7uAZRWOxd2DBbVCaxxFSPVZjVnqi p2Mq3u22f3YDqzGmCzGFkkKzTdLH1XVpIWrO0IdLPsAAaBy/3fk7P/WXCDozJGYMHdzI oy+WTUv/7Ay35EMTC9/s+aFijCExFLJnGF8YfKe2rUdDGIL04dvvLumLXJPzXqUdxXeD D/mA1qVcuNsPICUU91wq03k3k0mocPIzuIt87SDHIDRtbKSab+sNT7Yk7USEzLl8v+ea /xcd9GZTttkoBfKoU2+6fl+btMuUq8bggkDOWjb5DaDPOoKIOSdAhR0TLeElYLGCE0Yw wR7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r14si9250986eds.270.2020.07.19.09.58.01; Sun, 19 Jul 2020 09:58:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726097AbgGSQ5v (ORCPT + 99 others); Sun, 19 Jul 2020 12:57:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgGSQ5v (ORCPT ); Sun, 19 Jul 2020 12:57:51 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01199C0619D2; Sun, 19 Jul 2020 09:57:50 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxCdG-00G0xu-6G; Sun, 19 Jul 2020 16:57:46 +0000 Date: Sun, 19 Jul 2020 17:57:46 +0100 From: Al Viro To: "Xu, Yanfei" Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] userfaultfd: avoid the duplicated release for userfaultfd_ctx Message-ID: <20200719165746.GJ2786714@ZenIV.linux.org.uk> References: <20200714161203.31879-1-yanfei.xu@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 19, 2020 at 09:58:34PM +0800, Xu, Yanfei wrote: > ping Al Viro > > Could you please help to review this patch? Thanks a lot. That's -next, right? As for the patch itself... Frankly, Daniel's patch looks seriously wrong. * why has O_CLOEXEC been quietly smuggled in? It's a userland ABI change, for fsck sake... * the double-put you've spotted * the whole out: thing - just make it if (IS_ERR(file)) { userfaultfd_ctx_put(ctx); return PTR_ERR(file); } and be done with that.