Skip to content

Commit 2a5aff3

Browse files
committed
Fix two locking issue: one LOR and one issue where sbwait() was
called while holding a mutex.
1 parent 703ca42 commit 2a5aff3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

usrsctplib/netinet/sctp_output.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#ifdef __FreeBSD__
3636
#include <sys/cdefs.h>
37-
__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 349999 2019-07-15 14:54:04Z tuexen $");
37+
__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 350254 2019-07-23 18:31:07Z tuexen $");
3838
#endif
3939

4040
#include <netinet/sctp_os.h>
@@ -14507,10 +14507,10 @@ sctp_lower_sosend(struct socket *so,
1450714507
stcb,
1450814508
SCTP_OUTPUT_FROM_USR_SEND, SCTP_SO_LOCKED);
1450914509
}
14510-
if (hold_tcblock == 1) {
14511-
SCTP_TCB_UNLOCK(stcb);
14512-
hold_tcblock = 0;
14513-
}
14510+
}
14511+
if (hold_tcblock == 1) {
14512+
SCTP_TCB_UNLOCK(stcb);
14513+
hold_tcblock = 0;
1451414514
}
1451514515
SOCKBUF_LOCK(&so->so_snd);
1451614516
/*-

usrsctplib/netinet/sctp_usrreq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#ifdef __FreeBSD__
3636
#include <sys/cdefs.h>
37-
__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 349986 2019-07-14 12:04:39Z tuexen $");
37+
__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 350248 2019-07-23 18:07:36Z tuexen $");
3838
#endif
3939

4040
#include <netinet/sctp_os.h>
@@ -1420,9 +1420,9 @@ sctp_shutdown(struct socket *so)
14201420
abort_anyway:
14211421
op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, "");
14221422
stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6;
1423+
SCTP_INP_RUNLOCK(inp);
14231424
sctp_abort_an_association(stcb->sctp_ep, stcb,
14241425
op_err, SCTP_SO_LOCKED);
1425-
SCTP_INP_RUNLOCK(inp);
14261426
return (0);
14271427
}
14281428
}

0 commit comments

Comments
 (0)