Re: [PATCH] pipe: wakeup wr_wait after setting max_usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Brauner <brauner@xxxxxxxxxx> wrote:

> From: Lukas Schauer <lukas@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxx>
> [Christian Brauner <brauner@xxxxxxxxxx>: rewrite to account for watch queues]
> Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>

Reviewed-by: David Howells <dhowells@xxxxxxxxxx>






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux