From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.4 1/4] Revert "fs: check FMODE_LSEEK to control internal pipe splicing"
Date: Sun, 16 Oct 2022 08:46:23 +0200 [thread overview]
Message-ID: <20221016064454.369430347@linuxfoundation.org> (raw)
In-Reply-To: <20221016064454.327821011@linuxfoundation.org>
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 <saeed.mirzamohammadi@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/splice.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/splice.c b/fs/splice.c
index ae5623244d5e..e509239d7e06 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -895,15 +895,17 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
{
struct pipe_inode_info *pipe;
long ret, bytes;
+ umode_t i_mode;
size_t len;
int i, flags, more;
/*
- * 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 = file_inode(in)->i_mode;
+ if (unlikely(!S_ISREG(i_mode) && !S_ISBLK(i_mode)))
return -EINVAL;
/*
--
2.35.1
next prev parent reply other threads:[~2022-10-16 6:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-16 6:46 [PATCH 5.4 0/4] 5.4.219-rc1 review Greg Kroah-Hartman
2022-10-16 6:46 ` Greg Kroah-Hartman [this message]
2022-10-16 6:46 ` [PATCH 5.4 2/4] mac80211: mlme: find auth challenge directly Greg Kroah-Hartman
2022-10-16 6:46 ` [PATCH 5.4 3/4] wifi: mac80211: dont parse mbssid in assoc response Greg Kroah-Hartman
2022-10-16 6:46 ` [PATCH 5.4 4/4] wifi: mac80211: fix MBSSID parsing use-after-free Greg Kroah-Hartman
2022-10-16 19:19 ` [PATCH 5.4 0/4] 5.4.219-rc1 review Guenter Roeck
2022-10-17 7:12 ` Naresh Kamboju
2022-10-17 8:56 ` Sudip Mukherjee (Codethink)
2022-10-17 10:01 ` Jon Hunter
2022-10-17 17:54 ` Florian Fainelli
2022-10-17 18:03 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221016064454.369430347@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=saeed.mirzamohammadi@oracle.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.