Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18258173rwd; Tue, 27 Jun 2023 14:14:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7IjEyq9aRbeJeaKxN47HR49KzmZsre2WYhbcbCHU/tQD60C7UFhf5Bn3F6G8Qn6Dr8yE1d X-Received: by 2002:a17:903:2348:b0:1b7:ed6a:d8a5 with SMTP id c8-20020a170903234800b001b7ed6ad8a5mr8813389plh.61.1687900498037; Tue, 27 Jun 2023 14:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687900498; cv=none; d=google.com; s=arc-20160816; b=FQQxSK6oDhHXCSklpS9X78Yxll31u0qfvG/2pWszA2YFubBjJUtxgIXghMCXwc92Ct 3eCpS2h1d1CNUaitXY4qxSdOSrTnfmdZBdCOk4zWWoXRWQDa2EMn3cqOnxLexuxuUDHB ozJHEJal+k+Ozm0KuyNC/4473lULIMcEOAYXVBQXut8yd15b00iOa8lS92Pyv1QlQ/8y NhPxrwamhqIHm3cfVZg84Sje/jaRzxir6m9OgcDcSkTZ2FPoKAZqsWh+wj+x7pZ2HNtV I/pprtmwvYH0YCGf7dSDVYUbJNSc/1eXXn8LFDqh3nXV622Lcdbw8Mc7OsTXe9Lw2+Lb UadQ== 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=nB2HhBFSMAYSyJuXIEO4bSCePNLcfSFj8Iou8Kq0Uvw=; fh=EwHFucLs4bwDakTQKl/ndDudi5N9htFCanErUntz+qw=; b=twk9UP6dMCQSXylN1ViTGLcSCWaw395ehdAe8ZgUb9bgxSPaelfzufwIgKQrS6xeUK nd6h5bP4dNppBeVLeYSJFC63IMk9f4Hz5N6oBdh5RgDSbolF0N2xsCf94+FxGUSOPQ6h xlkFpbRmbsv98bKZYW/t84OHezd4Bve1XnoO+nLYdJx2iHvKji7l8BXlu0bNPeO2JBmv DVcTtmXAydu1t7ee5+1Bh3SWMRFM0HizUB57u3LL4pXiEvEAARmPV+LJmWkfHQV1W+hF HhQTz+ZyTVhn5OmmtfFFMovOco74lyKd1KN/Oknaa3gpyNSUGTGK9tCfZCjO4AfUnIYJ N7fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=lvGWVQNO; 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 n10-20020a1709026a8a00b001b11168bdddsi4588638plk.520.2023.06.27.14.14.45; Tue, 27 Jun 2023 14:14:57 -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=lvGWVQNO; 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 S231659AbjF0UvP (ORCPT + 99 others); Tue, 27 Jun 2023 16:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbjF0UvK (ORCPT ); Tue, 27 Jun 2023 16:51:10 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DAC782D54; Tue, 27 Jun 2023 13:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687899065; bh=3nrkr9p7FZVJ/pMwJqhBp8M6P5Ay4Bhj6H5jTZYvtg0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lvGWVQNO8/o44Da7YlQ8itfHbwOsJKP7c9R3/eoLHV9YZ+bz8Pwa7lyyeUG4z/Lts k9dtOx9BBVqNTqj0eDSjtO4RFZJfgTyJgAiP1asbOmVyPwQSdy69gmWpXyhaliDRfm ao5/U4tIKuHJb2EzDYxP8N6YJmvkt/bseDXA8JNV0+cLoXfK7IKHHcuc6YfHlOcx1U /t95tPT0rtvQ9IOE3ft4CCMuEAJX+GEewOY4bNkUzkaQvnn+AL5iZpC8Cei/HcQT/8 zLplP+rBntzTPAgvujTofXMYXw7U8/XpaPFRsnkwRcZbX/iqMK3yyH2FiZtHrZP9Gq eJNHIUkf8Q1iQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 263C81536; Tue, 27 Jun 2023 22:51:05 +0200 (CEST) Date: Tue, 27 Jun 2023 22:51:04 +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@lists.linux.it Subject: [PATCH v4 3/3] splice: fsnotify_access(in), fsnotify_modify(out) on success in tee Message-ID: <1274d6074fdd2ca4e028c8b62e42d0ef2b847703.1687898895.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4ot4an2wv4srdmhm" 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 --4ot4an2wv4srdmhm 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 Link: https://bugs.debian.org/1039488 Signed-off-by: Ahelenia Ziemia=C5=84ska Reviewed-by: Amir Goldstein --- fs/splice.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/splice.c b/fs/splice.c index d3a7f4d5c078..bdbabc2ebfff 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1810,6 +1810,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 --4ot4an2wv4srdmhm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmSbS7cACgkQvP0LAY0m WPGHoBAAuEr2KQDe9rtumdeeAh4Ffl/KEpS/Bi8/idfGipB+ouXMPgw5YvEzycCN SczBs3/Iw+E/8CHFuXJN9XFrj0GglDr/cYmH0qmZ1ljmKnQUa/P6iRmPhZErr8lv hHVtfszJGBb2MInCUmEom0SZjZloyvQLtipSabeasgrtBf8prBZcOdjvnzIolGKq T2IJ2v9xP2ijrNavdvxcO66Gh9ibnQqYAyZtajaXek0qyY0RJoSY7V5N3RwGLQuS cDsn9fiXYH91zB02leNyzQySWSnS7EIcG1NeSi4SL15ZD9s0srr6LuA5oWBiZBNa oMTG1zjE2/F85qMEBuCBpFeWw4EHXgVs8XU6XSQXxwSzRHpbPbCOJzQvVNfANVAe UN61cHxHSPePvWNUG4hnPTCP7ZyTPvNNxVzZ5T8XjT2wAYjTR39bxJczN2wrZkfV ASrgDVj4mQlReuJD2IWt9S9NTtSzU3TOqWxGi0jXt3m+dxArFS8WW/YK0fmJ2yaq ZfuaoEEV05G2hqXPvdW3FHFLmdFqG7JlCJsA3gat05z3GttSRmDQaQRDy6CJ0GbW eSgfr9yFp3ZwuDxqTfWz3vOr6VtX3HHx8n8lRTzzuoUS9iaWW3uNTLYEaEak2koz nR6OJn7z2/mQ7+gX8GqJMEmnf7UcH1zTTG2xPukKB9bGaYhPVvU= =CovH -----END PGP SIGNATURE----- --4ot4an2wv4srdmhm--