From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D505D1170F for ; Mon, 11 Sep 2023 13:51:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5773AC433C9; Mon, 11 Sep 2023 13:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694440302; bh=sBuIOgnkAgv/5QIX+/bp4D04mTDAe+4jgZsmG2SbRdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zf6kMt2JUyQgxcrlEGlwAtPGvNXlJBKBtvoQHu5H9Kkoklh+Rj8R2HPxFP8tGLkei JAOD1Lsrzoiu7mxn4+oHQ7Lg1Jzcupk1FjVtuH5MEspp57XaTFLmttK1dk7S18gaYl 1CH0BHLciwFaF15DT6/hrOkStLlKY75FJOP7kE1o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Ahelenia=20Ziemia=C5=84ska?= , Jan Kara , Amir Goldstein , Christian Brauner , Sasha Levin Subject: [PATCH 6.5 014/739] splice: fsnotify_access(in), fsnotify_modify(out) on success in tee Date: Mon, 11 Sep 2023 15:36:53 +0200 Message-ID: <20230911134651.416837051@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230911134650.921299741@linuxfoundation.org> References: <20230911134650.921299741@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ahelenia Ziemiańska [ Upstream commit 576d498e0ac5caff2d9f6312573ab54d98f12d32 ] 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 Link: https://bugs.debian.org/1039488 Signed-off-by: Ahelenia Ziemiańska Acked-by: Jan Kara Reviewed-by: Amir Goldstein Message-Id: <10d76dd8c85017ae3cd047c9b9a32e26daefdaa2.1688393619.git.nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Christian Brauner Signed-off-by: Sasha Levin --- fs/splice.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/splice.c b/fs/splice.c index 5f38d921dc074..2e4cab57fb2ff 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1931,6 +1931,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.40.1