git: ecfe48f28a40 - stable/13 - sctp: add an assert
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Jan 2024 12:41:24 UTC
The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=ecfe48f28a40700f4950c2e5bd21ebc49b942bf4 commit ecfe48f28a40700f4950c2e5bd21ebc49b942bf4 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2023-08-13 20:47:43 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2024-01-11 12:40:56 +0000 sctp: add an assert This enforces a condition mentioned in a comment. (cherry picked from commit e8eb0b713426fe9edbf56719351850fa9469286a) --- sys/netinet/sctputil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 72edf4dd66c9..e21fbe041291 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -3636,7 +3636,6 @@ sctp_notify_adaptation_layer(struct sctp_tcb *stcb) &stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); } -/* This always must be called with the read-queue LOCKED in the INP */ static void sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, uint32_t val, int so_locked) @@ -3652,6 +3651,8 @@ sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, return; } + SCTP_INP_READ_LOCK_ASSERT(stcb->sctp_ep); + m_notify = sctp_get_mbuf_for_msg(sizeof(struct sctp_pdapi_event), 0, M_NOWAIT, 1, MT_DATA); if (m_notify == NULL) /* no space left */