sctp: don't keep being locked on a stream which is removed

Reported by:	syzbot+f5f551e8a3a0302a4914@syzkaller.appspotmail.com
MFC after:	1 week
This commit is contained in:
Michael Tuexen 2021-10-02 00:48:01 +02:00
parent c9536389d7
commit 3ff3733991

View File

@ -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;
}