aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_ss_functions.c
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2021-10-01 22:48:01 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2021-10-01 22:48:01 +0000
commit3ff3733991ba049959c4fd2e7179ea96241a396e (patch)
tree5b607600aef179adea1488ffa4db9228dcb6cfea /sys/netinet/sctp_ss_functions.c
parentc9536389d732feecf61afa4632397d67b04b2ab4 (diff)
downloadsrc-3ff3733991ba049959c4fd2e7179ea96241a396e.tar.gz
src-3ff3733991ba049959c4fd2e7179ea96241a396e.zip
sctp: don't keep being locked on a stream which is removed
Reported by: syzbot+f5f551e8a3a0302a4914@syzkaller.appspotmail.com MFC after: 1 week
Diffstat (limited to 'sys/netinet/sctp_ss_functions.c')
-rw-r--r--sys/netinet/sctp_ss_functions.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/netinet/sctp_ss_functions.c b/sys/netinet/sctp_ss_functions.c
index 5293c0fee742..c08bec07c588 100644
--- a/sys/netinet/sctp_ss_functions.c
+++ b/sys/netinet/sctp_ss_functions.c
@@ -150,6 +150,9 @@ sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
asoc->ss_data.last_out_stream = NULL;
}
}
+ if (asoc->ss_data.locked_on_sending == strq) {
+ asoc->ss_data.locked_on_sending = NULL;
+ }
TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.rr.next_spoke);
strq->ss_params.scheduled = false;
}
@@ -466,6 +469,9 @@ sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
asoc->ss_data.last_out_stream = NULL;
}
}
+ if (asoc->ss_data.locked_on_sending == strq) {
+ asoc->ss_data.locked_on_sending = NULL;
+ }
TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.prio.next_spoke);
strq->ss_params.scheduled = false;
}
@@ -635,6 +641,9 @@ sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
asoc->ss_data.last_out_stream = NULL;
}
}
+ if (asoc->ss_data.locked_on_sending == strq) {
+ asoc->ss_data.locked_on_sending = NULL;
+ }
TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.ss.fb.next_spoke);
strq->ss_params.scheduled = false;
}