diff options
author | Michael Tuexen <tuexen@fh-muenster.de> | 2019-07-23 14:52:20 -0400 |
---|---|---|
committer | Michael Tuexen <tuexen@fh-muenster.de> | 2019-07-23 14:52:20 -0400 |
commit | 2a5aff3baab0711ef8930adfee3d1aeb1a16f79a (patch) | |
tree | e6f8882fea8e8cdfabb10d90f23ffafeea861cd1 | |
parent | 703ca424f92cae1330d1a61d78740e828a9fe260 (diff) | |
download | usrsctp-2a5aff3baab0711ef8930adfee3d1aeb1a16f79a.tar.gz |
Fix two locking issue: one LOR and one issue where sbwait() was
called while holding a mutex.
-rwxr-xr-x | usrsctplib/netinet/sctp_output.c | 10 | ||||
-rwxr-xr-x | usrsctplib/netinet/sctp_usrreq.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usrsctplib/netinet/sctp_output.c b/usrsctplib/netinet/sctp_output.c index d0e8f271..779e68b5 100755 --- a/usrsctplib/netinet/sctp_output.c +++ b/usrsctplib/netinet/sctp_output.c @@ -34,7 +34,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 349999 2019-07-15 14:54:04Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_output.c 350254 2019-07-23 18:31:07Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -14507,10 +14507,10 @@ skip_preblock: stcb, SCTP_OUTPUT_FROM_USR_SEND, SCTP_SO_LOCKED); } - if (hold_tcblock == 1) { - SCTP_TCB_UNLOCK(stcb); - hold_tcblock = 0; - } + } + if (hold_tcblock == 1) { + SCTP_TCB_UNLOCK(stcb); + hold_tcblock = 0; } SOCKBUF_LOCK(&so->so_snd); /*- diff --git a/usrsctplib/netinet/sctp_usrreq.c b/usrsctplib/netinet/sctp_usrreq.c index 275c1024..6f583145 100755 --- a/usrsctplib/netinet/sctp_usrreq.c +++ b/usrsctplib/netinet/sctp_usrreq.c @@ -34,7 +34,7 @@ #ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 349986 2019-07-14 12:04:39Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_usrreq.c 350248 2019-07-23 18:07:36Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -1420,9 +1420,9 @@ sctp_shutdown(struct socket *so) abort_anyway: op_err = sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, ""); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_USRREQ + SCTP_LOC_6; + SCTP_INP_RUNLOCK(inp); sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_LOCKED); - SCTP_INP_RUNLOCK(inp); return (0); } } |