From: David Howells <dhowells@redhat.com>
To: Christian Brauner <brauner@kernel.org>
Cc: dhowells@redhat.com, Lukas Schauer <lukas@schauer.dev>,
linux-fsdevel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] pipe: wakeup wr_wait after setting max_usage
Date: Fri, 01 Dec 2023 11:56:17 +0000 [thread overview]
Message-ID: <3429984.1701431777@warthog.procyon.org.uk> (raw)
In-Reply-To: <20231201-orchideen-modewelt-e009de4562c6@brauner>
Christian Brauner <brauner@kernel.org> wrote:
> From: Lukas Schauer <lukas@schauer.dev>
>
> Commit c73be61cede5 ("pipe: Add general notification queue support") a
> regression was introduced that would lock up resized pipes under certain
> conditions. See the reproducer in [1].
>
> The commit resizing the pipe ring size was moved to a different
> function, doing that moved the wakeup for pipe->wr_wait before actually
> raising pipe->max_usage. If a pipe was full before the resize occured it
> would result in the wakeup never actually triggering pipe_write.
>
> Set @max_usage and @nr_accounted before waking writers if this isn't a
> watch queue.
>
> Fixes: c73be61cede5 ("pipe: Add general notification queue support")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=212295 [1]
> Cc: <stable@vger.kernel.org>
> [Christian Brauner <brauner@kernel.org>: rewrite to account for watch queues]
> Signed-off-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: David Howells <dhowells@redhat.com>
next prev parent reply other threads:[~2023-12-01 11:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 10:11 [PATCH] pipe: wakeup wr_wait after setting max_usage Christian Brauner
2023-12-01 11:56 ` David Howells [this message]
2023-12-01 13:01 ` Christian Brauner
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=3429984.1701431777@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=lukas@schauer.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox