+5
−2
Loading
stable inclusion from stable-v5.10.210 commit 162ae0e78bdabf84ef10c1293c4ed7865cb7d3c8 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9Q9EU CVE: CVE-2023-52672 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=162ae0e78bdabf84ef10c1293c4ed7865cb7d3c8 -------------------------------- [ Upstream commit e95aada4cb93d42e25c30a0ef9eb2923d9711d4a ] Commit c73be61c ("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. Link: https://bugzilla.kernel.org/show_bug.cgi?id=212295 [1] Link: https://lore.kernel.org/r/20231201-orchideen-modewelt-e009de4562c6@brauner Fixes: c73be61c ("pipe: Add general notification queue support") Reviewed-by:David Howells <dhowells@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by:
Lukas Schauer <lukas@schauer.dev> [Christian Brauner <brauner@kernel.org>: rewrite to account for watch queues] Signed-off-by:
Christian Brauner <brauner@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Zizhi Wo <wozizhi@huawei.com>