From nobody Fri Dec 19 16:01:22 2025 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 9D0D4FA3741 for ; Mon, 24 Oct 2022 13:36:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233105AbiJXNgQ (ORCPT ); Mon, 24 Oct 2022 09:36:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236386AbiJXNa4 (ORCPT ); Mon, 24 Oct 2022 09:30:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2626AACF72; Mon, 24 Oct 2022 05:33:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 072F4612E4; Mon, 24 Oct 2022 12:33:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C1E6C433C1; Mon, 24 Oct 2022 12:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614801; bh=N8y/aHVvIULtmLOJGdQJkklPhvik5UeCcUPrgoO6Tu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2DgfOvsV1uTFYV+YsBd9qxZRnTlQoP+98hxFuHxZGtkl3/gIWxkA1G9NHhZoABXSN DEZ1a3Juq5ZfUZ4jlrJ0k4Ju47cZTnxuu06s0E5h8NEOfOJB2MT5n2bEA95ryYKI7w jTZZ/y26D80YgqSfO946xGHpKlYkwZYLuZUMUogk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Saeed Mirzamohammadi , Sasha Levin Subject: [PATCH 5.15 001/530] Revert "fs: check FMODE_LSEEK to control internal pipe splicing" Date: Mon, 24 Oct 2022 13:25:45 +0200 Message-Id: <20221024113045.040469515@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This reverts commit fd0a6e99b61e6c08fa5cf585d54fd956f70c73a6. Which was upstream commit 97ef77c52b789ec1411d360ed99dca1efe4b2c81. The commit is missing dependencies and breaks NFS tests, remove it for now. Reported-by: Saeed Mirzamohammadi Signed-off-by: Sasha Levin --- fs/splice.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/splice.c b/fs/splice.c index 3abcd7fbc9f2..5dbce4dcc1a7 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -814,15 +814,17 @@ ssize_t splice_direct_to_actor(struct file *in, struc= t splice_desc *sd, { struct pipe_inode_info *pipe; long ret, bytes; + umode_t i_mode; size_t len; int i, flags, more; =20 /* - * We require the input to be seekable, as we don't want to randomly - * drop data for eg socket -> socket splicing. Use the piped splicing - * for that! + * We require the input being a regular file, as we don't want to + * randomly drop data for eg socket -> socket splicing. Use the + * piped splicing for that! */ - if (unlikely(!(in->f_mode & FMODE_LSEEK))) + i_mode =3D file_inode(in)->i_mode; + if (unlikely(!S_ISREG(i_mode) && !S_ISBLK(i_mode))) return -EINVAL; =20 /* --=20 2.35.1