Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp88508ybh; Tue, 21 Jul 2020 17:10:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHXme5+3iNYY6opBw5ZoPyP9v0lO3KJGL5Rvh/1MwQTOhHSboaJypi4jMJqi3u05UAGhp3 X-Received: by 2002:a50:8fc4:: with SMTP id y62mr27363816edy.170.1595376644404; Tue, 21 Jul 2020 17:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595376644; cv=none; d=google.com; s=arc-20160816; b=M9InaIu2jsgJQ4PoVr8vz3hH8he35DhccvwFPac9qPGSsT3FnWjGTZCT69Dw0y6Zeh KeOx573dWfhgP8ng110Pzs/6lQYlnUy26H9Mh7LPOtS2iJSwKtGC2Gw7iPtmt7P30xgY 9AkAqElc5OEmSUU0T5o4isg7omfyUTN7PscMEWynJjG7vMF44CNTq+dox2fyhWhMiEvd aEcaIdmggqN/SBnwFH8P+bLBoXYEHwLKHGNx04GIJu+ShKy+Y1IVYljsGEBWMwZYz5qm Jsgf2d7pC042f6h+dfz30AeBC4PpaJWiQAhy1L66X5HKawicyIOeYGVKlxuj1RUJGBAc 0a0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mK85RUGmwRYffliq+MRSbfx2SUtfwZmJnFiHDQarqLA=; b=yJ+Yzi4UalD6FCye0Jlp/sszcoealgGXVftIR8t3yFnXiWuXycCOSVBOmvhn6zycuH 9japF5GUfm54iHr3XyvB/R5XlTr5750HwDnna3UiPFQhQg3RTFKRSccfFTsv/8CD+ogZ ltQfoyxq3reLBc/0cZTk1MlGv3eHV+KtmMb97gu6O6caOe6XKQp1WrHW/klnnRR/ubWa snuapTZplXjoxym8pzZuLlt0SjQgcXiFFBI57kUF//KEc/Eo7f9OxLyBzI5u1tlD2vpa rSS4bkfp9eX6GZV4bpyapJyPs4VzL+Z5SdWqAroHpMHLoAe8vgtPG2uOtF7PimCZuElS PLjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vdHaaaa9; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si4274723ejo.375.2020.07.21.17.10.16; Tue, 21 Jul 2020 17:10:44 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=vdHaaaa9; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727795AbgGVAJb (ORCPT + 99 others); Tue, 21 Jul 2020 20:09:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726587AbgGVAJb (ORCPT ); Tue, 21 Jul 2020 20:09:31 -0400 Received: from mail-ua1-x941.google.com (mail-ua1-x941.google.com [IPv6:2607:f8b0:4864:20::941]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B95FC0619DB for ; Tue, 21 Jul 2020 17:09:30 -0700 (PDT) Received: by mail-ua1-x941.google.com with SMTP id u6so67161uau.8 for ; Tue, 21 Jul 2020 17:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mK85RUGmwRYffliq+MRSbfx2SUtfwZmJnFiHDQarqLA=; b=vdHaaaa9IE2S38rf1OOdBGMCtcqKWiiXSSoVcwkPuAA/Op7k48Xcv5bIHUGHrNaSO+ /EoDVOzVWw/2+fyMgxyh4ZHq/JGxvQAckTOQKU/CCZTN4zMs+UJYqaoIkXVU1aZZ0hDF /iya58oVKtmixWpxPy0oyt5p2E98nDspu/ULCEbd0lE95lR/cQId1MURVaH9c+R5MSuq MfQMswQfTa8am4zkexMwcDniT3sQgxtnAp7DQCK9o96gXD9gDtJi/U1xdPnf2+ShZ1r0 zBvH4PilGuGoTO6TStVIxyq+/V6KGki/CBSPyF5XRTtY9q+wyTIAemS6kjc3VSj3K7Bn NQ6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mK85RUGmwRYffliq+MRSbfx2SUtfwZmJnFiHDQarqLA=; b=FZ7Y7DgOHu8wXNTSe5QYsPyKi2RPkZfu+OWRkqsjTVJaE5RW5widBWbXHhSLgadi8t 05aAceGhs1Q+28b4kWWH6syHFGmZCWFXb1wNYS39DeZKolDya6D8elhGdNf9Iuo3PDh9 CFQCjnIh9GDfQpQkMMjRCeT3toe6KBoaIHSrSyYeQx7oB2yrKq3Ax6YSYQH/5z3C5wP8 Pzcx2sfqzshg9R4x+H/4ofOVHOsWGj9yzInJK9yflRAoG1cwfF/3HGNmWljVtCLJeB19 G+XVlv2xBxKxrIWh0eDQglezf02ESurhl1mB7EZGV6//l7MD7p9D3K5ZHdz7aO9G+qgB 2rLg== X-Gm-Message-State: AOAM530RZ9hllZyZgJr48B1EYb+qmkQVSYZw8ps95jCcZbFjkWr67qZ/ LzYGT/OGmxFaH2VrTqBELwHWbr0jkkHt0kSF+mMucg== X-Received: by 2002:ab0:7182:: with SMTP id l2mr22366441uao.13.1595376569751; Tue, 21 Jul 2020 17:09:29 -0700 (PDT) MIME-Version: 1.0 References: <20200714161203.31879-1-yanfei.xu@windriver.com> <20200719165746.GJ2786714@ZenIV.linux.org.uk> <021ffaaa-daa4-8d80-c5bd-3a6c816d4703@windriver.com> In-Reply-To: <021ffaaa-daa4-8d80-c5bd-3a6c816d4703@windriver.com> From: Suren Baghdasaryan Date: Tue, 21 Jul 2020 17:09:18 -0700 Message-ID: Subject: Re: [PATCH] userfaultfd: avoid the duplicated release for userfaultfd_ctx To: "Xu, Yanfei" , Lokesh Gidra Cc: Al Viro , linux-fsdevel@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" 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 6:34 PM Xu, Yanfei wrote: > > > > On 7/20/20 12:57 AM, Al Viro wrote: > > 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, > Yes, it's -next. > > Daniel's patch looks seriously wrong. > Get it. > > Regards, > Yanfei > > * 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. > > Adding Lokesh to take a look.