Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26283955rwd; Mon, 3 Jul 2023 07:44:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ78UTy/UQcgg1XR9G9cHc2EKWIgRhOVVYHKxvtwyhkbr5UvLWp2Od33PKPjFU/O8/chkMeR X-Received: by 2002:a05:6a20:5499:b0:127:3c6e:fc83 with SMTP id i25-20020a056a20549900b001273c6efc83mr15132652pzk.42.1688395468796; Mon, 03 Jul 2023 07:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688395468; cv=none; d=google.com; s=arc-20160816; b=PQl7bTbkYHnPJ4xOS4LtL8tC41MTOvgyWakSk3CB5j5cGFNIBoEDL0vzaRhcFJXQ8J bvBzTfp7Uu/j0CnaX8EH2lUGyfsbWAvCyqZ/NN69hKqfYptr5Mij5k/nEMdJfHHddCUK kVuznA5BROnuVhXcoDAsgVi6JDALm3U9q4/ScRRqOSDMlyi9z0CFhU+cc5Y2zyQ6D8mp Fi4IXvC2DyJreJxsgHsKzjaVSd46TVHPb2vv5LtWxo5AwNb7c+T2pPIu+sy6PiNUxrTl KnQVAdsqvEfdKdVIcG2rJNh033Er7SSmV/a0FgYFi8xe5+20ZWCEikVMZ/mxQUnyOL1r bsHw== 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=giTQJ2zpd3lLBmA47HNrew2ito+XTx/TmIVybCLGoeA=; fh=AfCaarrJloRV9X8pgVoQkWOYp+JFhFv1/c5FQOfH+1Q=; b=tRMmHlvbkRqBQCUKZAYO+/2b5T8k8BZ55YgRc4aM6+3qyAzCkPyrBx1WWAyGHvCeoJ ksG9pP9SbIN4zx3Mb6lFk6zhAfd/Uknwwx1a2/JpUBtzEdUDwDs6zJ/iziqDH5DTJ3aB iTpIq2/8xdkXePjUrxGj0KGdLIsHWzM1nJ7Qx6OHs9coQloW6Y7lkoG7h/Jm7FSZoAZW Ka8smYfFADZ7EG4eaYDG6DGOeUzeBlf3A2WQkucDBOiOcR/EOmoSb4zz7ka31neicPgH pbJwUuouMOK159qDwmcN1IXqH5NNF1HOe3+q7+kgFW0Rr6PrgNVYu/iU0YBVxTp7JnEE Co2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=AhrIA4bp; 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 cr14-20020a056a000f0e00b00675aec34aedsi16082048pfb.375.2023.07.03.07.44.16; Mon, 03 Jul 2023 07:44: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=@nabijaczleweli.xyz header.s=202305 header.b=AhrIA4bp; 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 S231271AbjGCOmW (ORCPT + 99 others); Mon, 3 Jul 2023 10:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbjGCOmU (ORCPT ); Mon, 3 Jul 2023 10:42:20 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 428C3E5C; Mon, 3 Jul 2023 07:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1688395338; bh=bxFjauUq2WL32jHSPjtbjDPG477Jdv0YrEDq/u80aBE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AhrIA4bpNXctnbjB9zL/sj1rGqhNvu6fT18CYncnYQWpQSIoov7xveEfjOSjqjLPy zFtA91S2is2jbaHqb6RgRM3K+YTrqhLPanrW513653hGfBScv8jheHZe9kn0okLZZJ XKA+JI+Yg0gIQrMPbxwRdGJ9k8THmYYI2v3APzNvzS8NqREcJzHyi8SqAHc1REhDAb TdXAgU+ldh/kaK3eaOOH/XDcfCLjqBQvtKHCWbxiQdr3wWsbCEEtQ7uT4FVP57VCL3 kYYXfuN2yUQWehsiZ/iLwv1fgzmh7N4qgxt2MBp0PUydMkBLfKNDQ2tHekvoqg0yO5 EZklTMJRFR6dg== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 8FBCE1B6C; Mon, 3 Jul 2023 16:42:18 +0200 (CEST) Date: Mon, 3 Jul 2023 16:42:17 +0200 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= To: Christian Brauner Cc: Alexander Viro , Jan Kara , Amir Goldstein , Chung-Chiang Cheng , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/3] splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice Message-ID: <8d9ad5acb9c5c1dd2376a2ff5da6ac3183115389.1688393619.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ybsrpykphwaki6lg" 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 --ybsrpykphwaki6lg 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 Acked-by: Jan Kara --- fs/splice.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/splice.c b/fs/splice.c index 6ae6da52eba9..5deb12d743b1 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1346,6 +1346,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 @@ -1375,8 +1378,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 --ybsrpykphwaki6lg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmSi3kkACgkQvP0LAY0m WPGb/g/9GGTQCA3sX50kUiY44a5rX+Ff2TYxykNMrLWb5vbRU+KcvUQeMpXDOWiB a6I5vSYTnbLemmo7VVKNUPAtN85nKRu8k30QFlYPA8nBXOBQhnfa+mu6hYzEEPZ/ oSBTcdj4eNtgDExIfQ9azx7onGtPQ/W8B4q6sXWSEy/olpqYZEwbT+D9AqZNYj+k VgcFI+dtbSw/fk03vhihniKRLrkue9vyDdkhYDuwvCLyZ0FO/W4Fnp73NPrz54g8 oUdYaOR4wfDYaFf2Mo++4wRlNsBxsVsC8+VMQKPsx2MNuyGUH1o+Hus38/htUGVk DjMp/P6icRwWLZ8+SWt3qpg1POt8voICR6OuI8JvutiHAZiMcyKvyA1vDe8Oi3sf //uzGtAyoKd2x1AybJMoYnMTdV1j8PJfxBH+8VVh6SCTCWdGcklifS2TyWZShoCt F9tKIBayhCOyEHesQQjMiIG5N2BiOnkX9Zr6gKrXwT2wFpeedAZIW4tl4af8Hv9G 1VrnO+hSsA5bLg77KgXlO3sYMLiQsW9oG3uTBds62ownw1xroMKNGIS0hHtNYk8V pUdfLZyUfbc/Kx1S4Wxz1isLdmN7dBuBj00o195RgrcsTUQhIcAYuX6c2+/CI+OC pcfVrAylsjVNMqyKwNC1ywpWxsxzMWmUaj9UQFPeVuuKkdqcG7g= =BYux -----END PGP SIGNATURE----- --ybsrpykphwaki6lg--