From patchwork Mon Jun 26 23:09:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?0L3QsNCx?= X-Patchwork-Id: 13293594 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C5D9EB64D7 for ; Mon, 26 Jun 2023 23:09:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229851AbjFZXJT (ORCPT ); Mon, 26 Jun 2023 19:09:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbjFZXJO (ORCPT ); Mon, 26 Jun 2023 19:09:14 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F77E1701; Mon, 26 Jun 2023 16:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687820951; bh=+Yr5r5tG9lNpcgAHvStT9mCUIkD4YLaRJRy3M3c4Tqg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hxU83TaBoEaA02pAlqIgCfA16dHrOofbg/dUHxRm+2un6Yumd2364qaq5EXEWuAij 632S4cpDA3idsBq2OkWgVzcdLx0NLSFfFLqV4JLRbW4sRySMe0cxU9B+DABZJt+3Yi crgWARtpmWtnl0jjDkWNrTd3APkR8P4cuSRusIiLNDtMdjE2z2PlDEJLLtWcEjnIZS b1+17vzZ6LmLyx8prL6gS0LNg/Bouspz32sLX4IcYx+30+PwCXhOmVxKu063ltZFXo TcF12OEfXHCrHAO2sK3pdaXjrZOwHFewL4oQfa2GfPldDWwlcOraU0lJiTIjDQPNwe gWc8+LPpbST1A== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 70917EEE; Tue, 27 Jun 2023 01:09:11 +0200 (CEST) Date: Tue, 27 Jun 2023 01:09:10 +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 Subject: [PATCH v2 2/3] splice: fsnotify_modify(fd) in vmsplice Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20230517 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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 --- fs/splice.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/splice.c b/fs/splice.c index 94fae24f9d54..a18274209dc1 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1447,6 +1447,9 @@ SYSCALL_DEFINE4(vmsplice, int, fd, const struct iovec __user *, uiov, else error = vmsplice_to_user(f.file, &iter, flags); + if (error > 0) + fsnotify_modify(f.file); + kfree(iov); out_fdput: fdput(f);