Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2489384rdg; Mon, 14 Aug 2023 04:27:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjCwOAVYrx3CqytxygtXL1hXWvcT3Zk2uUk8WJdQankWdhlT5BWVloUrDDSOr8GplZtoNW X-Received: by 2002:a05:6512:1109:b0:4f8:6833:b13c with SMTP id l9-20020a056512110900b004f86833b13cmr6996408lfg.14.1692012448592; Mon, 14 Aug 2023 04:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692012448; cv=none; d=google.com; s=arc-20160816; b=UWHOsXh9b+l8ReYIal6gBzglnuhvHuomDkVouc210CGnt/YRNd09Alc4En7DMBBt5y pkR/CQNwHFCBPE3iku3wmyAStPjortvswJnAZ4y4ZfpbaXW1e//ZxKY4BPD/vXrVIUy/ h2pCumdumMmSSIuoyBZWO/jJ40+6ZlWBiEZoyTEIVtjrRPXQC6ZpOLH7fJZkHarnCiql rUw+0gWYWZoHQHK+mf4PKovUSSd66lUueTx84Cxq2or40PIv/OH86sGYxb7SyTy1R61E cyaKDg4sTAWvkn2qGxbbm2cgy3c+SKRBklHVCxCTX9ySJsyqVHur/7d0ZUbbxL5HNitu 7DLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=LT0OaCPd61k3/xuFtTRuhfa3SWYpqLwDHB86rSkZVfA=; fh=BNL3jezrGkhdMfTN0bbg9QZDKqNcHKalHXQTS4ni5Wg=; b=sE8LdwA8YXp7SmrJ1qib0Fp+OWfkoQnraTv1DgV6XFX8Zc55H4wP9D+TQ748ZTSLaP iVJSunIw4tqqtVw7SC7uswm809/fj5sd3P4i0g95E/ejhOosDnvuHHU0H9J3sFVcDjuu k9bPa+cF1wYamfG7XhRRwr5aWQtDozPtyPKvixHIb4OPKrvUw2XM24avHMXYFSdY1oPD 3KQWGNkuj7CyIS3+pXYa3xosryiNtnBsPiuxxeoqYb1Gyio3NkkWmtAx4V88ZKPxOs8z qAvegbQF9ZxHmvExN+SeoGV9pG2nKcBI9DU/XaiWP3un/7nup/lO6HkgTgVzrqlckEJm x9cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=ij7hW52g; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ja11-20020a170907988b00b00992e520a593si7585207ejc.1004.2023.08.14.04.27.03; Mon, 14 Aug 2023 04:27:28 -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=@szeredi.hu header.s=google header.b=ij7hW52g; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230394AbjHNLDS (ORCPT + 99 others); Mon, 14 Aug 2023 07:03:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjHNLCv (ORCPT ); Mon, 14 Aug 2023 07:02:51 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DB8518F for ; Mon, 14 Aug 2023 04:02:48 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-99bcfe28909so541533066b.3 for ; Mon, 14 Aug 2023 04:02:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1692010966; x=1692615766; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LT0OaCPd61k3/xuFtTRuhfa3SWYpqLwDHB86rSkZVfA=; b=ij7hW52gui9yvHzBS30YckIi9Cf3Ea0ytH2mgr35CspJvPiNTFdCykOo5Wj+CrrU53 Bqd5SDC3f040JB4H9MHBvYYC30xmKbWh30YKnjOL2bHTW/g36d3zXmbr11IVPgNOMTTG qOa9l178XWHWCW7rs61cx0zL6lXYMNazEwU8Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692010966; x=1692615766; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LT0OaCPd61k3/xuFtTRuhfa3SWYpqLwDHB86rSkZVfA=; b=RJU8jTwYAyHqvyKgCARwXIVbAzh2OAiDW8UirLgCR2eSRHcuU/kEcp5wnrNYa5pp6a niH1Uz7uSeN3IrA14H2UE/vq53x6LXjNQbbNlGQwWMg2O0EZkCL1ysz7HOvVlGQWcnQd hIdaxKF4pdBzQurCogtDo7S0XYFSIZkWTppdC0RJdIiblKYJLVnBF73TI4x4vi4xQF8+ MzCyyLyHUhyptFuesy2qxZV7gm84ZhkpRWpTSlbI4CGMkKndSh4VHLbikRpq9YfR5wGB KyUW89QfGiIiK3835PECGj05eOPAyodtDaxNaYBY91ttgrBIWJffTeuMLPPEle34FYDU 4hdQ== X-Gm-Message-State: AOJu0YyW12QoElalQ8YewmIGbXyfdO3dE4gOpIa0WAz2i/itKqJWh/2x glWZiVx28Qac+1K5cq5VbOD6bqjTfyapHRJxNcKG/A== X-Received: by 2002:a17:906:5dc1:b0:988:8be0:3077 with SMTP id p1-20020a1709065dc100b009888be03077mr6644363ejv.31.1692010966572; Mon, 14 Aug 2023 04:02:46 -0700 (PDT) MIME-Version: 1.0 References: <4f66cded234462964899f2a661750d6798a57ec0.camel@bitron.ch> In-Reply-To: <4f66cded234462964899f2a661750d6798a57ec0.camel@bitron.ch> From: Miklos Szeredi Date: Mon, 14 Aug 2023 13:02:35 +0200 Message-ID: Subject: Re: [REGRESSION] fuse: execve() fails with ETXTBSY due to async fuse_flush To: =?UTF-8?Q?J=C3=BCrg_Billeter?= Cc: "Eric W. Biederman" , Tycho Andersen , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, regressions@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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, 14 Aug 2023 at 08:03, J=C3=BCrg 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. 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? Thanks, Miklos