Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2597719rdg; Mon, 14 Aug 2023 07:35:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE4fyA4kScEZO1hEkcX1wFfFLxiOM0VflZ2frD6m4JFNmDGfz7SBk/z7z+bflQkn2zHk1fl X-Received: by 2002:a17:906:74d5:b0:99b:d1cb:5add with SMTP id z21-20020a17090674d500b0099bd1cb5addmr7511379ejl.35.1692023704488; Mon, 14 Aug 2023 07:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692023704; cv=none; d=google.com; s=arc-20160816; b=fiunsNWapFRhsKaK1po2VWJ3bRblsCcCaXv7jjFG1W9WHGxo+Xx0uLs9aP9iuMKNeP SbStRui4ycUjKaAYC4iKU92knFQkUN/re37JsCj1CxJsnYjCWdd5N3IIkcgbTtgE7tLb aXghysTQ1FtXy/BkbnzAYYBW821kT9cel2aPL03Thq26ICI+rT2vBbiK+lhKcmlRtrlW hOIeO+MGws7z5Z2x91SesP3bLW3J5Kz/u74GCCccToWsmju0r+9+gOMYW002OZicIfZM XsXVK+7+iU4l2XXzw/HT76Ae6P7hqFff7/4i6bDe12V/UDdWWDZKU/2y+sDKEg92mNY/ l38Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=V4Mqsvn0mkFBlxGUCbEghrLXs9l8NfuTuHHE9sQ4L48=; fh=MwP5+1sTnPX9J7NXtP88rklFjTtRrnvMI3G7H59aRuA=; b=1DzyHawGkYCudzDbVnBQysgQa74CMHdw7UZl19Cujl/FrS+b0WDjh5b1GqXA1GLb8J ydKF6+Cs2ZM4xgDSjNB385wc9G+WV9bTszrqyf4PbvjAaGzH/4i1lYxaWfQCcvzQz0Yf 1E5yPF1bRCVj1oy1SqGUrXmdDORNfo63q9ZDBtc+pb8NIYMu3HqECZNYidkpnf7AFsHP LDGh/XigO+dOJCtMXl5o+fwXsnDjWB/XqE+Lp0BuJEhvMdiqMfYbWlByF759NnXRrSm6 gss3FO2/KoOOaOVrSN6vOWiWWOdgYa/RGg0PACqKln7wPAkWwD1oAZHXuI7iSeteQTfk ipKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm3 header.b=avjl7gmH; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=zUI+0irw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gx19-20020a170906f1d300b00965ec09592bsi7014437ejb.817.2023.08.14.07.34.38; Mon, 14 Aug 2023 07:35:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tycho.pizza header.s=fm3 header.b=avjl7gmH; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=zUI+0irw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230081AbjHNOAf (ORCPT + 99 others); Mon, 14 Aug 2023 10:00:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232289AbjHNOAb (ORCPT ); Mon, 14 Aug 2023 10:00:31 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC6C810DD; Mon, 14 Aug 2023 07:00:26 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3528C5C0189; Mon, 14 Aug 2023 10:00:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 14 Aug 2023 10:00:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho.pizza; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1692021626; x=1692108026; bh=V4Mqsvn0mkFBlxGUCbEghrLXs9l8NfuTuHH E9sQ4L48=; b=avjl7gmH89v1HjLkGteWjWMg0ALJ3xJWEi1SFm3+qBT3D8OWrLy T5k4KlAs/xKVrhz4kEiRFF5C0RADWMgp+JDEh3XC5xMB0q4X1P8R11KDlMAPZ1D2 +6tSrgeS8ojMFmvUV07hPAF1pAvA3i0GBQY2lsOIvuCZfjcnSntlBNZn5qkyoyfC iyVN/V2MGub6Ve5a3MyvvsfpY5csEqGZZHauJIDAhQy0UoZ8AQzai+EUdtZT511r xkB0CL8IyEtouxqpE9acZU6VraTDrAg6poLVBznB8VZK3nQd/iSdltHIo2sbcmjX 3wGGu4QqQYmmAqIxC0LloCrNN9ozEIEVTJg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1692021626; x=1692108026; bh=V4Mqsvn0mkFBlxGUCbEghrLXs9l8NfuTuHH E9sQ4L48=; b=zUI+0irwTXuT11zSktr7ZXVi7c1ZMTv2YUkNpRZigW5Tb5rSbm5 srV0m6y9y8zB7wQUJcfZYx2qKKY9kGdpwyPmbG63u7xfLWOFEu5jymTQFQtltfZx 3MHwbnllyxBvD5+1oENVpGMARWLNn6uzailF3QHMeI7ErsRWchbd/XKMRsC/LDCF vlKUPgZWF8nYpYwPRBdyya7aSpQ6Yg/ZuF3MyMX3DB4rPleU/xbv4NGe4hwqtoCP +qPDa7leperHaBhgZhfdN6wj09dY1XBhxPXGrHphFfg5DJ2iNnCrguduXKiwgzbX MbCMvbrQKglURjOBoSXvatagtRIwXWKZZrQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddtgedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjsehtkeortddttddunecuhfhrohhmpefvhigt hhhoucetnhguvghrshgvnhcuoehthigthhhosehthigthhhordhpihiiiigrqeenucggtf frrghtthgvrhhnpeevffehhfetteeffeelgefhffetueefhedtieekleefgeegtedutddt lefhhfetieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthigthhhosehthigthhhordhpihiiiigr X-ME-Proxy: Feedback-ID: i21f147d5:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Aug 2023 10:00:24 -0400 (EDT) Date: Mon, 14 Aug 2023 08:00:22 -0600 From: Tycho Andersen To: Miklos Szeredi Cc: =?iso-8859-1?Q?J=FCrg?= Billeter , "Eric W. Biederman" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, regressions@lists.linux.dev Subject: Re: [REGRESSION] fuse: execve() fails with ETXTBSY due to async fuse_flush Message-ID: References: <4f66cded234462964899f2a661750d6798a57ec0.camel@bitron.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 14, 2023 at 01:02:35PM +0200, Miklos Szeredi wrote: > On Mon, 14 Aug 2023 at 08:03, J?rg Billeter wrote: > > > > Since v6.3-rc1 commit 5a8bee63b1 ("fuse: in fuse_flush only wait if > > someone wants the return code") `fput()` is called asynchronously if a > > file is closed as part of a process exiting, i.e., if there was no > > explicit `close()` before exit. > > > > If the file was open for writing, also `put_write_access()` is called > > asynchronously as part of the async `fput()`. > > > > If that newly written file is an executable, attempting to `execve()` > > the new file can fail with `ETXTBSY` if it's called after the writer > > process exited but before the async `fput()` has run. > > Thanks for the report. > > At this point, I think it would be best to revert the original patch, > since only v6.4 has it. I agree. > The original fix was already a workaround, and I don't see a clear > path forward in this direction. We need to see if there's better > direction. > > Ideas? It seems like we really do need to wait here. I guess that means we need some kind of exit-proof wait? Tycho