Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sctp: Do not wake readers in __sctp_write_space()

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>

authored by

Petr Malat and committed by
Jakub Kicinski
af295892 83d96231

+2 -1
+2 -1
net/sctp/socket.c
··· 9100 9100 wq = rcu_dereference(sk->sk_wq); 9101 9101 if (wq) { 9102 9102 if (waitqueue_active(&wq->wait)) 9103 - wake_up_interruptible(&wq->wait); 9103 + wake_up_interruptible_poll(&wq->wait, EPOLLOUT | 9104 + EPOLLWRNORM | EPOLLWRBAND); 9104 9105 9105 9106 /* Note that we try to include the Async I/O support 9106 9107 * here by modeling from the current TCP/UDP code.