From: David Howells <dhowells@redhat.com>
To: torvalds@linux-foundation.org, ebiggers@kernel.org
Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] pipe: Fixes
Date: Thu, 05 Dec 2019 17:21:36 +0000 [thread overview]
Message-ID: <157556649610.20869.8537079649495343567.stgit@warthog.procyon.org.uk> (raw)
Hi Linus, Eric,
Here are a couple of patches to fix bugs syzbot found in the pipe changes:
(1) An assertion check will sometimes trip when polling a pipe because the
ring size and indices used are approximate and may be being changed
simultaneously.
An equivalent approximate calculation was done previously, but without
the assertion check, so I've just dropped the check. To make it
accurate, the pipe mutex would need to be taken or the spin lock could
be used - but usage of the spinlock would need to be rolled out into
splice, iov_iter and other places for that.
(2) The index mask and the max_usage values need to be regenerated after
dropping the locks to wait in pipe_write() as F_SETPIPE_SZ could have
been called during the wait.
David
---
David Howells (2):
pipe: Remove assertion from pipe_poll()
pipe: Fix missing mask update after pipe_wait()
fs/pipe.c | 3 +++
1 file changed, 3 insertions(+)
next reply other threads:[~2019-12-05 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 17:21 David Howells [this message]
2019-12-05 17:21 ` [PATCH 1/2] pipe: Remove assertion from pipe_poll() David Howells
2019-12-05 17:42 ` Linus Torvalds
2019-12-05 17:21 ` [PATCH 2/2] pipe: Fix missing mask update after pipe_wait() David Howells
2019-12-05 17:40 ` Linus Torvalds
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=157556649610.20869.8537079649495343567.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=ebiggers@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).