Message ID | sun5nn6nzp7cvn43m7476rchcel42zuxv6mo2fab6tu24wc2it@intt5usuvpoq |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp7834391vqr; Mon, 26 Jun 2023 17:01:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7mXRS8x/44FQN35fGlWPH+GcPpTRmnOlSZLRMCiEcq3Uo0DR7SY/j6lU4gMyri+MkrPqk0 X-Received: by 2002:a17:903:258b:b0:1b7:ecbb:aa06 with SMTP id jb11-20020a170903258b00b001b7ecbbaa06mr6955641plb.55.1687824096003; Mon, 26 Jun 2023 17:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687824095; cv=none; d=google.com; s=arc-20160816; b=d78nywl+VKUZTKeUah0F/GDlZEVjF52UtEk/j1JQMwvFcCrOWuN2/0NF8HaMPYLm96 3hPtOlm70F0i9zHsqUM2RZ3JzykHYM0TCBqRLJGccfNB7shH7TqvrDesnRrZnLnWlakq cXl8x9mv09Vmiz1k906PE1qbonVSiB+npbSAWdtfmLxgTO0KQNUHA8wOnL/0pCI4ypGa xcO+mzxm7Bkzz2ZHKBYcFNCLxk/jU3Ty89w4/H6nAYnCEy2PsAJXCFElyQIVX+bNWAoQ 6/FhMLGuK7b6NPdBWVZ0EomU0wRDyj934bmgboYv1B8zRjt7yUYovbUtL2RgJXXNYn+1 yesA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a170902820500b001a6f0e81ec7si5418854pln.237.2023.06.26.17.01.23; Mon, 26 Jun 2023 17:01:35 -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 S230115AbjFZXJc (ORCPT <rfc822;filip.gregor98@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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?= <nabijaczleweli@nabijaczleweli.xyz> To: Amir Goldstein <amir73il@gmail.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jan Kara <jack@suse.cz>, Chung-Chiang Cheng <cccheng@synology.com> Subject: [PATCH v2 3/3] splice: fsnotify_access(in), fsnotify_modify(out) on success in tee Message-ID: <sun5nn6nzp7cvn43m7476rchcel42zuxv6mo2fab6tu24wc2it@intt5usuvpoq> References: <CAOQ4uxj_DLm8_stRJPR7i8bp9aJ5VtjzWqHL2egCTKe3M-6KSw@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6v2kz5au4jz2wk57" Content-Disposition: inline In-Reply-To: <CAOQ4uxj_DLm8_stRJPR7i8bp9aJ5VtjzWqHL2egCTKe3M-6KSw@mail.gmail.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769811839165828875?= X-GMAIL-MSGID: =?utf-8?q?1769811839165828875?= |
Series |
fanotify accounting for fs/splice.c
|
|
Commit Message
Ahelenia Ziemiańska
June 26, 2023, 11:09 p.m. UTC
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/jbyihkyk5dtaohdwjyivambb2gffyjs3dodpofafnkkunxq7bu@jngkdxx65pux/t/#u
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
fs/splice.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Tue, Jun 27, 2023 at 2:09 AM Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> 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/jbyihkyk5dtaohdwjyivambb2gffyjs3dodpofafnkkunxq7bu@jngkdxx65pux/t/#u > Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Makes sense. Reviewed-by: Amir Goldstein <amir73il@gmail.com> > --- > 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) > } > } > > + if (ret > 0) { > + fsnotify_access(in); > + fsnotify_modify(out); > + } > + > return ret; > } > > -- > 2.39.2
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) } } + if (ret > 0) { + fsnotify_access(in); + fsnotify_modify(out); + } + return ret; }