Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18085452rwd; Tue, 27 Jun 2023 11:22:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sQhd79K05DJfZLT23R5URofr72Gl0XHFYovOsOM6YotGJdWxrnBeX+veo84L7BgRJnzLn X-Received: by 2002:a05:6a20:7f8a:b0:118:2e5a:efab with SMTP id d10-20020a056a207f8a00b001182e5aefabmr32375507pzj.4.1687890134889; Tue, 27 Jun 2023 11:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687890134; cv=none; d=google.com; s=arc-20160816; b=ly5fyu75A0Ri8cwgNl5iToU1y3vy5mvRXGlxhDY9IynTi78arUSBaRNhEmaz09xX27 44zEuCX9xo8ROCSH5b0dMy6ESYke9gFlRk1QS8kmZex5qCDfn9DcL88FK7ShprZjMQpE +p13KVDWlUdFsD9zMhOEfzUsapCVnwshT6jqgfc3HlhJHkzMe7EdUhmWDRINMFtfv/ws 0JjePG3jTVI9RsJFBV1cOwd8GCG88mLsJz9zZuCoz1xv1mNhPJRVQ9uXD4GNZX7BvoV9 LRsjai/YB2s6lt7eTBzuaF14uL39x4ZwsbH3Ap5DuQ7s0SHkYhhpkhvrz7UDFUqw5sxW eoqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=AQrySK1ZT+LbbRMNZlZ2lWn/isV1vrbKMhcsTS1OQBo=; fh=tqRbcSzGBk4lpV/pfyPeX4jugtdYu/Oaz8s71R5Kofg=; b=iScqoAiMpu+37yVZg+v3TH6COt1IejhujLUG+te1oMoK1UeMs+I4GZBoBYN5YMTW7h /kMnpF/avDwO9Lc/yDljxBIvNnJKC1BCSdP3Je/n+E4cdhzfF5nJ/erMMb00UF9e3oQ6 RU8zPq8ww4Gz5b8QIV0Wp8Jxp9h/HniV87M+kJwucLLAf73zHC9aQvvU1zWO53/cIowW HboqA67AvQTc3yKk/jIXODGrSrsNjtzgBfga0s0BSM9cqH8ALqBE97dMVxoQ2zhnfhc9 ztws9izepyAsFBw/J0+YW9oqQtXgz9ZG08zLjautWWksTvr1CP01Kz+5aMzDLXlhwLud hK2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ccscMLZM; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca11-20020a056a00418b00b0066f7fe56433si6429349pfb.103.2023.06.27.11.22.01; Tue, 27 Jun 2023 11:22:14 -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=@gmail.com header.s=20221208 header.b=ccscMLZM; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229777AbjF0SM4 (ORCPT + 99 others); Tue, 27 Jun 2023 14:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbjF0SMA (ORCPT ); Tue, 27 Jun 2023 14:12:00 -0400 Received: from mail-vs1-xe32.google.com (mail-vs1-xe32.google.com [IPv6:2607:f8b0:4864:20::e32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BB292D57; Tue, 27 Jun 2023 11:11:48 -0700 (PDT) Received: by mail-vs1-xe32.google.com with SMTP id ada2fe7eead31-443628ee79dso914430137.1; Tue, 27 Jun 2023 11:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687889507; x=1690481507; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AQrySK1ZT+LbbRMNZlZ2lWn/isV1vrbKMhcsTS1OQBo=; b=ccscMLZMEwPohsP0JL0F0FqIN8zX0+vDczPhemjc6yR/jzlE4nT8d6b6k92Vguqt4d NESTNiXaU1ZEduS+rja8/5KnMT02uHBmx+PiS19hu+O10kphzNynKJF/GO6rbGL6PcTD XlyoSgihlwPqX0TIDgifW7fG9zonE2kjltpP+tXy56upzsOijWOnx8wDjXFsnqQ5nFs1 cGZ2Nj0iSu5AoXQk6zb77Dt89hpFM+vNyzErzp5VFJg91zRDBa4m6eQ16lc9+VDc3NtQ 4HHjBg/L4qk6e7X047uUZt34MrJ1hWCg+XcHlqRGX5WZuBE4vIL1kgvt6YLh8/CC7C7I /8/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687889507; x=1690481507; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AQrySK1ZT+LbbRMNZlZ2lWn/isV1vrbKMhcsTS1OQBo=; b=Bki/LSu4lHJSQTAGPK1cPx3tn3eCSqn5QlbwFB99eRZi3lzmCUvl5fAIfiL63Bk6HZ sOtDWa7z7tOYU2JijQy8mm9RBGNk2rfJsp+eHS74LHdtyfGYkRSWHnUGWQBtS5z2Sp/3 jHNswGe0lti2WRcJKwWctha+Y5Egp9jamFF0B2Ha9yony7HpzOgybz7tnfKSp/YZP001 tnKegXtw4PaQfsOuRcO8bWqFpcwZz30ApXNhwn57c8AamBwkRQRk+JdvNTxPlYAX+jBl 3gfwhMX8rsGv7V+c0DA6XhAvi8/USmYRPx/lZ3TDiDNFKLihZgiCvkMzy5ONXdVOZgjR aXIQ== X-Gm-Message-State: AC+VfDwXmEWccLDzS13Mts2sQQbtCGAGM85wXfRcFvw4iOmL5sAeqUp+ d8NyEDiJ4LFd+PDiRtb34sIWVYvU2y40jWt7IGs= X-Received: by 2002:a05:6102:1cf:b0:43d:c0d5:ed27 with SMTP id s15-20020a05610201cf00b0043dc0d5ed27mr15223175vsq.32.1687889506864; Tue, 27 Jun 2023 11:11:46 -0700 (PDT) MIME-Version: 1.0 References: <4206d7388fdbee87053c9655919096225a461423.1687884031.git.nabijaczleweli@nabijaczleweli.xyz> In-Reply-To: <4206d7388fdbee87053c9655919096225a461423.1687884031.git.nabijaczleweli@nabijaczleweli.xyz> From: Amir Goldstein Date: Tue, 27 Jun 2023 21:11:35 +0300 Message-ID: Subject: Re: [PATCH v3 2/3] splice: fsnotify_access(fd)/fsnotify_modify(fd) in vmsplice To: =?UTF-8?Q?Ahelenia_Ziemia=C5=84ska?= Cc: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara , Chung-Chiang Cheng , ltp@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Jun 27, 2023 at 7:55=E2=80=AFPM Ahelenia Ziemia=C5=84ska wrote: > > 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/jbyihkyk5dtaohdwjyivambb2gffy= js3dodpofafnkkunxq7bu@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 e16f4f032d2f..0eb36e93c030 100644 > --- a/fs/splice.c > +++ b/fs/splice.c > @@ -1346,6 +1346,9 @@ static long vmsplice_to_user(struct file *file, str= uct iov_iter *iter, > pipe_unlock(pipe); > } > > + if (ret > 0) > + fsnotify_access(file); > + > return ret; > } > > @@ -1375,8 +1378,10 @@ static long vmsplice_to_pipe(struct file *file, st= ruct 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; > } > > -- > 2.39.2 >