summaryrefslogtreecommitdiff
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-10-07 14:54:21 +0100
committerMark Brown <broonie@kernel.org>2024-10-07 14:54:21 +0100
commit344190e0347324d95393c561a4b8c8dfa8cd628b (patch)
tree20d054b028d30ed361fbaeb20f319482e4a8312f /net/sctp/socket.c
parente4926ca0189dac2e780d6d3cca92052376fd7f0e (diff)
parent8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b (diff)
ASoC: Merge up v6.12
Fixes build issues with the KVM selftests
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 32f76f1298da..078bcb3858c7 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -8557,8 +8557,10 @@ static int sctp_listen_start(struct sock *sk, int backlog)
*/
inet_sk_set_state(sk, SCTP_SS_LISTENING);
if (!ep->base.bind_addr.port) {
- if (sctp_autobind(sk))
+ if (sctp_autobind(sk)) {
+ inet_sk_set_state(sk, SCTP_SS_CLOSED);
return -EAGAIN;
+ }
} else {
if (sctp_get_port(sk, inet_sk(sk)->inet_num)) {
inet_sk_set_state(sk, SCTP_SS_CLOSED);