Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18255354rwd; Tue, 27 Jun 2023 14:11:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7LZzoaFrtcDxPcYSoYGsn+GGwTJu2aw62aFILWfPwM3H9zfQPzI+ntBjdBgmbWS2hSFzoO X-Received: by 2002:a05:6a00:b48:b0:67e:18c6:d2db with SMTP id p8-20020a056a000b4800b0067e18c6d2dbmr2533902pfo.28.1687900314151; Tue, 27 Jun 2023 14:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687900314; cv=none; d=google.com; s=arc-20160816; b=Vsq9ZXywQyKq6PkH6jEtuj82MpBmpKsXJREPfKRSJZJ7mQbfjgj6RPmSqFHKGU9dAN MkIAN+cPzP3ttaMIDvjKshDXlVQ9dLT8zUht4sP4J7ChirCidsdm1Zfj2k+WloxQJkp/ U6fQDMMW7MXWwsF6XsNE2Fpq5dFoYIAjIjbNoEsf+o5CeKUukoqQAwY+D+Ol5QRm9n95 wDd7a5aQZDV8NAcN7GrlvuLMSDS1tH2FIzLXMtPcdRcshZxw+AI7+Sv+pNruk5B+US9m 3brOq8RsaPvPxFjtSLGYahQXJBUBYC5A5w8i4GKsWFsTKjNaf90LwAkmFPTtevYEbVKV H+qA== 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=5c3jqWusw7yTHpo/mTlxqP1X9xA1G+7Wx7TyuyE9aoA=; fh=EwHFucLs4bwDakTQKl/ndDudi5N9htFCanErUntz+qw=; b=TuSE5OZSDboeuy7IGthsxDZtrAk8mFqOuaxJPMuvUInJgtWxSFcOZY13l+/4mQeiaq Om4MQufgTGzMvSlKCDXZJ1NoxgI3BLG1iEKEs4ippd6xpgmEDHPtJNRYRMDrlUbXv248 CfUgXqAXDwYWiJI2EYywvw9Shes6h4oC9SmQ+0hTrsUEf2/s1kcS4aY3Y3hpb+QU8Bcv McMlXhbwLalsuBh0PZ/1S/drZHmkBMwB4eaZ7MUv7Xi4bzCOSMuZjdx2WD/1B00/zqf+ pGS/43iTGqF2E5xhCjet63s/jQqBDLubhTVof45p2ujXMcG/rF9FyJa/EJSKCZSYvaMn wYUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=Idml7t5m; 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 cj14-20020a056a00298e00b0067ea76a7c59si1180448pfb.50.2023.06.27.14.11.42; Tue, 27 Jun 2023 14:11:54 -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=Idml7t5m; 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 S231680AbjF0UvM (ORCPT + 99 others); Tue, 27 Jun 2023 16:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231584AbjF0UvI (ORCPT ); Tue, 27 Jun 2023 16:51:08 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A77A0294A; Tue, 27 Jun 2023 13:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687899060; bh=6Wh1Cs4Lx6l34QcFbXvDoNqOObzq40OnIaHRz3J6+lA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Idml7t5m1KSjmntTg/8gAFAJ/EDz4Lr2BddO4Ua2npmHdP7LXjuQpA20sYyfh4I1i 3wFcnoO1EgqqLnLHQaLGlWiguVFmRIWfmP4QKt3LLt5xAK0P7JR8VT3yknBzAvTl0S fBoilZA9WGbENUtWy7UUhCqj8x46POnvEbjtSkIiKh43PP7312mlfq6SgumuRrcAOq dCMIUgpjwcReQknykV0svSul/aHybkpA0oeQ9YzonP2IY48CAuI7MC012GXzEZ5IOe cX0lMSEdsGKWvePax1AoLM01P1PX5Q6TzrZ/iGQBXxCp4tA1LjkYdp99nabv94ef+E swhyhQknB5SJA== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id C7B351A24; Tue, 27 Jun 2023 22:51:00 +0200 (CEST) Date: Tue, 27 Jun 2023 22:50:59 +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 2/3] splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nslsgyputznadjqs" 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 --nslsgyputznadjqs 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/splice.c b/fs/splice.c index b5c7a5ae0e94..d3a7f4d5c078 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1341,6 +1341,9 @@ static long vmsplice_to_user(struct file *file, struc= t iov_iter *iter, pipe_unlock(pipe); } =20 + if (ret > 0) + fsnotify_access(file); + return ret; } =20 @@ -1370,8 +1373,10 @@ static long vmsplice_to_pipe(struct file *file, stru= ct iov_iter *iter, if (!ret) ret =3D iter_to_pipe(iter, pipe, buf_flag); pipe_unlock(pipe); - if (ret > 0) + if (ret > 0) { wakeup_pipe_readers(pipe); + fsnotify_modify(file); + } return ret; } =20 --=20 2.39.2 --nslsgyputznadjqs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmSbS7MACgkQvP0LAY0m WPE64A//ThBem4any7e5paxp7oc9fQlzpzdhDmB1EiAaxJTCc4rLL9pLZ43RqqKH egDcXf25IIlV4leoEd7I/oYWkfMR4tAzAA2Ybemd6vfpfp+fNc8xmic7+IByh7IB 939PedK4wcXBvPZh0oZ2duU3sbMblUKzrytozJdb9xrw25RzBNHp9qKPEN8nxVRB rycnlrNotAgVJvdkQakHwktiX8gyACQP950oDpUWKNYV6iltzNd8bRxhr0B8b6zE ejFckwSRDTCOW9x69QamJRuLEeA6UjZW5ruaZ68Ue5SzP5kDsu+nRY6hLRhe6wyE JBj+isED2ITmAnIpioBQKYk8/zbo7ed3eDAJowYZdms+06WnVHhvEtGUNctuYiOK mLf6YoPLKbZr2h+hgMTzQnk6Owa3m3coi2Jnhj7BuUoVUAxwoqBMgWqd4ScgY9Tv PpjCCNaESUialmrLAOoMa2JfQWHRthXJN1ksoD27F3glS71SWDsmFgo32l6Ai5SH JiQhQWv/CHuNHow3EVQPKDi07Eq2reBjlGuknUYYDmaodljOSVtrvbhYkZh3XU34 y2fLQqfdcw8bLsOOKD79HcQJxhSfm7k2rH6X6G8WiA5+NN07YNQCyVI2j//e4Fj0 Dof0aJBFcHYOdiayTPdLdUlk0TNO3X2jV/EXcOT6P7jYPsc9kGA= =/GyC -----END PGP SIGNATURE----- --nslsgyputznadjqs--