aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/gecko.py
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2024-07-01 13:48:49 -0400
committerDavid S. Miller <davem@davemloft.net>2024-07-03 09:45:39 +0100
commitcda91d5b911a5a168a1c6e6917afda43b0e458c8 (patch)
tree59344614b873294a6a7068fa2f3e2a72add5681b /tools/perf/scripts/python/gecko.py
parent2e3ed20c17e719cbe7b13feaa3e7c46cf6a85887 (diff)
sctp: cancel a blocking accept when shutdown a listen socket
As David Laight noticed, "In a multithreaded program it is reasonable to have a thread blocked in accept(). With TCP a subsequent shutdown(listen_fd, SHUT_RDWR) causes the accept to fail. But nothing happens for SCTP." sctp_disconnect() is eventually called when shutdown a listen socket, but nothing is done in this function. This patch sets RCV_SHUTDOWN flag in sk->sk_shutdown there, and adds the check (sk->sk_shutdown & RCV_SHUTDOWN) to break and return in sctp_accept(). Note that shutdown() is only supported on TCP-style SCTP socket. Reported-by: David Laight <David.Laight@aculab.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions