Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16858213rwd; Mon, 26 Jun 2023 16:36:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6DNA49zuaz8YqRik82KQgKrddzfMCqgV3b2golw2P4fv4H29aJ1evKQWTFXUMppMMK0KVN X-Received: by 2002:a17:907:7da5:b0:991:f0dc:c930 with SMTP id oz37-20020a1709077da500b00991f0dcc930mr2174183ejc.16.1687822579207; Mon, 26 Jun 2023 16:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687822579; cv=none; d=google.com; s=arc-20160816; b=P7zWDdWqElrbmsnt6h2DqtI4e0sErcBXv/uNwdt6xsmlsdccItQWpjshxpxAXfwMFy 1gyANblD6y7r4nz5GXYkNzlorTJtmuG/6WfQS1kCyF/IjthbmjvTlaE2yg8HwNF+p/Hi Ptt+GqlV8YL9Eaf/esoEvGJ9dNxvuyfaR46eshAY7s2PJ+jWGqgEfX6aoxRgNHbyCjqw 9siCsuRTsIbEPLO/OdallkJpLpDQBmBnoe+7ecweB3gx/wSznxFDOiuxOBiLkOxnhAzr 0Nu3SB5OiaAWsfBbPKEq5WDLxU3diWdB1UvuSLzvJRegbTkHMfrkv8Pwbn+fcNpXOaLg kxDA== 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=lOgUeLDuRaSyoU0dtoaRuTIaB/9wuLE+xAjc64js7Rs=; fh=IHFQlbVsC+DUr5Z3Sb1CE3j8cu6SvNBPXxR31tL4TGQ=; b=iuC2vuRdqKoVYXJj9FgcqxensKEfPzSgSIH8luTgEJSZGPxh3x/yD5H66mt/LZ0mks 4/wJCJ5e5lU6i/cuogc9TnepQ8UNfCVzXcMNTIHNTKWjQywVAhuQWR3MyEVWijFx0vxc EYwIHRgmyAnzVBDLDBbN29cObk+x1+JHSA7gBbBOXGVp4ApPjhR1syf7i7PZUqmtJLiN 0dnOaRMu2AYmrR7dZuZBWlm1oISj1rKJDdR8FgpIccZefmrN1ztzNejyk32Aq/R3n+M9 btwtSTVTT8x6U4l5U9rCTEZl2Vo5wF0kOcr/lh9akHbWiXSeBuQLxJ10q7zv+jcfqPuH 3Fzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=aKRjZtez; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lw11-20020a170906bccb00b00988e953a583si3194572ejb.48.2023.06.26.16.35.52; Mon, 26 Jun 2023 16:36:19 -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=aKRjZtez; 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 S230113AbjFZXJc (ORCPT + 99 others); Mon, 26 Jun 2023 19:09:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230010AbjFZXJ2 (ORCPT ); Mon, 26 Jun 2023 19:09:28 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2D5BE173A; Mon, 26 Jun 2023 16:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687820960; bh=ahR55X1tMPjwCkeOkwkz+mlJGXSwvA70sfFtKUTZ6Ss=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aKRjZtezVd/LhdXkFG54SEwZN9ryQa8wFlxFxLBNvRD7v+XexIoRNNaWsxwWiD7KK SfwbA9gGZk/Wbd6xAEEM7d4ympWN90GKQOKfqcc7gQx1v1O0rD8m3ShhrlCO6w0GKt Lf331rDdyp1lrpT4cwdlSw/Ubf4bRQ2aUIUUtWNKetPOwUsVukkO5CzuuXxQy+BhlU qxDF3gIzlTk67ee5x01nR6CsDA9jHF0y2Jzd5fa7KIHTo4SVvZOP+Mx06mY+C5Z95p lH/WmXllzukRrcycICxqvzp4yqNy4iNX1UthdMYk4NEL5yL792W8QKb4uaHHsicrZl 3AS76GIikN2Pw== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 591DF179A; Tue, 27 Jun 2023 01:09:20 +0200 (CEST) Date: Tue, 27 Jun 2023 01:09:19 +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 Subject: [PATCH v2 3/3] splice: fsnotify_access(in), fsnotify_modify(out) on success in tee Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6v2kz5au4jz2wk57" 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 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 --6v2kz5au4jz2wk57 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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/jbyihkyk5dtaohdwjyivambb2gffyjs= 3dodpofafnkkunxq7bu@jngkdxx65pux/t/#u Signed-off-by: Ahelenia Ziemia=C5=84ska --- fs/splice.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/splice.c b/fs/splice.c index a18274209dc1..3234aaa6e957 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1819,6 +1819,11 @@ long do_tee(struct file *in, struct file *out, size_= t len, unsigned int flags) } } =20 + if (ret > 0) { + fsnotify_access(in); + fsnotify_modify(out); + } + return ret; } =20 --=20 2.39.2 --6v2kz5au4jz2wk57 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmSaGp4ACgkQvP0LAY0m WPG5ZA/8Dbc7CGTaG57JDKhdUPyBj5PUFwjx4sYQb1fqYm5MfazsqrGgnak/pIYq o7tEk7VIxw+I/7lJTACJdYJXsIVjPx2UQxgEwPOXz+jjcrDtg7shfHy6GbfePkkU 5orMzvl3GUktNpK8X8POtiZL43H7oVudaQepEYjPlvGOh8urxqDRdK0lIis8tq9o rqN+XFjvcWucCIO++nw/HsGKjrH4BArNFGfq8el0MKfVXUxAYxIpCQu6EFPeC1og odvfHi6Dbl11eoSQMV/+9VD5bYSgXVyH1sZ7QBxiYueOK6Bycz4t7e9ICdlbLFHC BT+CxTXCmujy2eRbH7WyROcNPjlLNZK9FvkqPzPSDfSqlS3h7iE+bqFBcPEWqVj/ 11OU4AdJ7EPvUxMkkupeJ/0VmX38ZPPASkMf9iRHPiehxkXh2fR/nQtO2APIW6Sx HY/gjDkBp3qrK2zk/3EySoC2bsKewOzd9kBp+/tmomuRU1iQkIDXz3RNeENS1T5m yn9kKhAC+357rfbP2LpKECYfYMRpBsm1z8e7p5wfy/8yo1pwsfC0qwFMd6EgJFhb GOjQtz33DLBTXqqEKOEYFOjVrHUqCTcbyXYrOMvbrRRn4DBaS1V6SBvAwqekPLEw GgYcj5oP9JV0u3z/bd/Xf2fKMNAyr1gBoI5JzDM0WDdmNebUV/g= =dHgG -----END PGP SIGNATURE----- --6v2kz5au4jz2wk57--