From patchwork Tue Jun 27 16:55:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 113515 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8350285vqr; Tue, 27 Jun 2023 10:12:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/5r8UyOa8S60dNd/sIcDIec8lmcHEwExTR6AgRZbTGFVyVRv45q70l/MP7y6OTvZXB1/5 X-Received: by 2002:aa7:c156:0:b0:51b:ebd7:6442 with SMTP id r22-20020aa7c156000000b0051bebd76442mr11138591edp.17.1687885953571; Tue, 27 Jun 2023 10:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687885953; cv=none; d=google.com; s=arc-20160816; b=vxpUrsDsMkDyj1WIuQUtw2GXZ7R8bSaw2T65cFytSTE2vWk0xPxn+CHS0K+o7nTk0O l8UiVaS2Bp6SvepVMqHYrB7c1bQhD2vOTGnxE57kwOygZug3qPkAfiaqsHMB/gGp/Fkc nAAqDGOPkmwuxgdENQllsWxDGPwAQn3X7IHEWF4MJx/qzEsbsNjzQSDaD18VUYvsnUB4 NBEEbq5awFjXGQerBYHjWKgCBbPDKLZybp2t0yV2THht4UGOh373Rd8R1VfkBWT4yeLo bBGSbaRoE12dp+UADX4bOJPw5V2vQaT2yh2310F4L7RhfFXhQJXK72fE/YySCFqCQlv3 L1bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OlV/XtRuF/SR3+9UrzZBJt3kkICjxCw53wEdkhKVuMA=; fh=dxa6PLKHmBVAinSve5UaytdH17N24IDvSMU4TVOqTkg=; b=h5HSTRnZj0AJ+uZ0SFWu/LAAfwM65jDCQTh/QSCDsMlLDE8j07Yp9Yj/3Fi8OXS5+e o4gnbBUnVxogtVEUuITMog+7OT/Byn8Ao1iIf07/kgQl8cfvmYgUcXrXA4LgtCtd/FYT mXguO3yA4e5ICBC01rZIApsOC5QY62htcM4ka9gPlt3mdUk0ddaqTg25l6PomytBZrLF lcjWU1+Efz72dAhRzu6WYPJa0SpjyZFdQKGLjySc6Rjp81N8TuhEi1A2Gg2SfFWiAyk7 C92RtkgDEx+WZ9uaTTihaaGrRBd3xlN39xGOQfzJ8wNKn6cPC3oDv6H6yseM1WKhdERA Apxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=CfHLC6O0; 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=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j24-20020aa7c418000000b0051db85e2570si34241edq.620.2023.06.27.10.12.07; Tue, 27 Jun 2023 10:12:33 -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=@nabijaczleweli.xyz header.s=202305 header.b=CfHLC6O0; 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=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229971AbjF0Q4G (ORCPT + 99 others); Tue, 27 Jun 2023 12:56:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbjF0Q4C (ORCPT ); Tue, 27 Jun 2023 12:56:02 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DC27018C; Tue, 27 Jun 2023 09:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687884956; bh=izqD3jT+ADWBX3rn8DQFe67pMsMvDJNKvE2GgEtMe7s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CfHLC6O0JAaN2qNDtJDzq4Gz/M5XN6XtFNQmfupTu66xUWMV5oPWGWAbtwX3Py7yu 1tOOCa4UaHEOzQptUN1dJeoxRQ8XT5HAOjbFS+/GRntcepqlX0tKIDgk9MsgZwEQsr IUxgNj7FFFPN7CBFpJwWDjL0EATSvlyg93KRax6n+ftB0MzQG4uc54WyWdmbvomfma U9Y8N+63Obc3b1YUQsxzT/EiHxN6b6U2CDDcHITQEc2ZSCV44JNwByM42BuxSDP803 K1QsxMTi2Z4+pbozxfaUr8yKAT/iGz4Ajtih/7wiyniZurlp82qwHxOkuuMtZum3o9 XeJ7DT8gi6REA== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 375471A90; Tue, 27 Jun 2023 18:55:56 +0200 (CEST) Date: Tue, 27 Jun 2023 18:55:55 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= To: Amir Goldstein Cc: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , Chung-Chiang Cheng , ltp@vger.kernel.org Subject: [PATCH v3 3/3] splice: fsnotify_access(in), fsnotify_modify(out) on success in tee Message-ID: <080710f0a1a5c0f124bfa6cc2569b976e0365a91.1687884031.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20230517 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769876701965902510?= X-GMAIL-MSGID: =?utf-8?q?1769876701965902510?= Same logic applies here: this can fill up the pipe, and pollers that rely on getting IN_MODIFY notifications never wake up. Fixes: 983652c69199 ("splice: report related fsnotify events") Link: https://lore.kernel.org/linux-fsdevel/jbyihkyk5dtaohdwjyivambb2gffyjs3dodpofafnkkunxq7bu@jngkdxx65pux/t/#u Link: https://bugs.debian.org/1039488 Signed-off-by: Ahelenia ZiemiaƄska Reviewed-by: Amir Goldstein --- fs/splice.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/splice.c b/fs/splice.c index 0eb36e93c030..2ecfccbda956 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1815,6 +1815,11 @@ long do_tee(struct file *in, struct file *out, size_t len, unsigned int flags) } } + if (ret > 0) { + fsnotify_access(in); + fsnotify_modify(out); + } + return ret; }