]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sctp: Do not wake readers in __sctp_write_space()
authorPetr Malat <oss@malat.biz>
Fri, 16 May 2025 08:17:28 +0000 (10:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:04:18 +0000 (11:04 +0100)
commit747eef5f01afec1a9119c359fbf85ca5af75b58f
tree90806157934d0f73f59ae20256eda3a16c70d6f5
parent99eec40d34cdfaed67323eb87a1b99cb3593033b
sctp: Do not wake readers in __sctp_write_space()

[ Upstream commit af295892a7abbf05a3c2ba7abc4d81bb448623d6 ]

Function __sctp_write_space() doesn't set poll key, which leads to
ep_poll_callback() waking up all waiters, not only these waiting
for the socket being writable. Set the key properly using
wake_up_interruptible_poll(), which is preferred over the sync
variant, as writers are not woken up before at least half of the
queue is available. Also, TCP does the same.

Signed-off-by: Petr Malat <oss@malat.biz>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20250516081727.1361451-1-oss@malat.biz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sctp/socket.c