From patchwork Tue Jun 27 20:51:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 113603 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8464349vqr; Tue, 27 Jun 2023 13:54:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Pnxo76Nn/UqSlIubcfelhdECLRrkjffH0rDOltXKVxpSqaYxy8cMQnFnp7Dc1nJLaUSia X-Received: by 2002:a17:903:11ce:b0:1a6:74f6:fa92 with SMTP id q14-20020a17090311ce00b001a674f6fa92mr9605948plh.19.1687899252749; Tue, 27 Jun 2023 13:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687899252; cv=none; d=google.com; s=arc-20160816; b=pJBK3OWLRDmdmNB3Xc7aMiXo65R9N8cd1oAfWHZ8p5uzcVJYnoOd/iTdspr7rq6jba TiN6snuZjg/yNRyfvGaMTjOm0YHgOH9NCatZMo3SFI3m3h6CyHAjvyipy/YF7P3q4ES9 CvYqwi+vXS2LlVqLBA5L79o3QwRajmSdX/McbCJmieEkX46k0gAbWSb+3LEVcerxYXuc SennSFKCwGbQ+34vlRzgzKox8OFrQC8exLuIczlHSQeEML2/yJN6306hzwVOjWH9NX72 JGJZK9ph3Saz5gt+OJlImIyuU3EZPy1D3johpl0VzXX8UFRwki8aIlM5c+voaTVFMBgE JFqw== 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=nB2HhBFSMAYSyJuXIEO4bSCePNLcfSFj8Iou8Kq0Uvw=; fh=EwHFucLs4bwDakTQKl/ndDudi5N9htFCanErUntz+qw=; b=twk9UP6dMCQSXylN1ViTGLcSCWaw395ehdAe8ZgUb9bgxSPaelfzufwIgKQrS6xeUK nd6h5bP4dNppBeVLeYSJFC63IMk9f4Hz5N6oBdh5RgDSbolF0N2xsCf94+FxGUSOPQ6h xlkFpbRmbsv98bKZYW/t84OHezd4Bve1XnoO+nLYdJx2iHvKji7l8BXlu0bNPeO2JBmv DVcTtmXAydu1t7ee5+1Bh3SWMRFM0HizUB57u3LL4pXiEvEAARmPV+LJmWkfHQV1W+hF HhQTz+ZyTVhn5OmmtfFFMovOco74lyKd1KN/Oknaa3gpyNSUGTGK9tCfZCjO4AfUnIYJ N7fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=lvGWVQNO; 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 i6-20020a170902cf0600b001b024322547si8019586plg.577.2023.06.27.13.54.00; Tue, 27 Jun 2023 13:54:12 -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=lvGWVQNO; 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 S230014AbjF0UvQ (ORCPT + 99 others); Tue, 27 Jun 2023 16:51:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231648AbjF0UvK (ORCPT ); Tue, 27 Jun 2023 16:51:10 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DAC782D54; Tue, 27 Jun 2023 13:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1687899065; bh=3nrkr9p7FZVJ/pMwJqhBp8M6P5Ay4Bhj6H5jTZYvtg0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lvGWVQNO8/o44Da7YlQ8itfHbwOsJKP7c9R3/eoLHV9YZ+bz8Pwa7lyyeUG4z/Lts k9dtOx9BBVqNTqj0eDSjtO4RFZJfgTyJgAiP1asbOmVyPwQSdy69gmWpXyhaliDRfm ao5/U4tIKuHJb2EzDYxP8N6YJmvkt/bseDXA8JNV0+cLoXfK7IKHHcuc6YfHlOcx1U /t95tPT0rtvQ9IOE3ft4CCMuEAJX+GEewOY4bNkUzkaQvnn+AL5iZpC8Cei/HcQT/8 zLplP+rBntzTPAgvujTofXMYXw7U8/XpaPFRsnkwRcZbX/iqMK3yyH2FiZtHrZP9Gq eJNHIUkf8Q1iQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 263C81536; Tue, 27 Jun 2023 22:51:05 +0200 (CEST) Date: Tue, 27 Jun 2023 22:51:04 +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 , ltp@lists.linux.it Subject: [PATCH v4 3/3] splice: fsnotify_access(in), fsnotify_modify(out) on success in tee Message-ID: <1274d6074fdd2ca4e028c8b62e42d0ef2b847703.1687898895.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 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,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769890646565557915?= X-GMAIL-MSGID: =?utf-8?q?1769890646565557915?= 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 Reviewed-by: Amir Goldstein --- fs/splice.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/splice.c b/fs/splice.c index d3a7f4d5c078..bdbabc2ebfff 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -1810,6 +1810,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; }