svn commit: r279867 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Tue Mar 10 22:38:11 UTC 2015
Author: tuexen
Date: Tue Mar 10 22:38:10 2015
New Revision: 279867
URL: https://svnweb.freebsd.org/changeset/base/279867
Log:
Keep track on the socket lock state. This fixes a bug showing up on
Mac OS X.
MFC after: 3 days
Modified:
head/sys/netinet/sctputil.c
Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c Tue Mar 10 22:23:56 2015 (r279866)
+++ head/sys/netinet/sctputil.c Tue Mar 10 22:38:10 2015 (r279867)
@@ -2745,7 +2745,11 @@ set_error:
static void
sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state,
- struct sockaddr *sa, uint32_t error)
+ struct sockaddr *sa, uint32_t error, int so_locked
+#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING)
+ SCTP_UNUSED
+#endif
+)
{
struct mbuf *m_notify;
struct sctp_paddr_change *spc;
@@ -2828,7 +2832,7 @@ sctp_notify_peer_addr_change(struct sctp
control,
&stcb->sctp_socket->so_rcv, 1,
SCTP_READ_LOCK_NOT_HELD,
- SCTP_SO_NOT_LOCKED);
+ so_locked);
}
@@ -3592,7 +3596,7 @@ sctp_ulp_notify(uint32_t notification, s
net = (struct sctp_nets *)data;
sctp_notify_peer_addr_change(stcb, SCTP_ADDR_UNREACHABLE,
- (struct sockaddr *)&net->ro._l_addr, error);
+ (struct sockaddr *)&net->ro._l_addr, error, so_locked);
break;
}
case SCTP_NOTIFY_INTERFACE_UP:
@@ -3601,7 +3605,7 @@ sctp_ulp_notify(uint32_t notification, s
net = (struct sctp_nets *)data;
sctp_notify_peer_addr_change(stcb, SCTP_ADDR_AVAILABLE,
- (struct sockaddr *)&net->ro._l_addr, error);
+ (struct sockaddr *)&net->ro._l_addr, error, so_locked);
break;
}
case SCTP_NOTIFY_INTERFACE_CONFIRMED:
@@ -3610,7 +3614,7 @@ sctp_ulp_notify(uint32_t notification, s
net = (struct sctp_nets *)data;
sctp_notify_peer_addr_change(stcb, SCTP_ADDR_CONFIRMED,
- (struct sockaddr *)&net->ro._l_addr, error);
+ (struct sockaddr *)&net->ro._l_addr, error, so_locked);
break;
}
case SCTP_NOTIFY_SPECIAL_SP_FAIL:
@@ -3681,15 +3685,15 @@ sctp_ulp_notify(uint32_t notification, s
break;
case SCTP_NOTIFY_ASCONF_ADD_IP:
sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data,
- error);
+ error, so_locked);
break;
case SCTP_NOTIFY_ASCONF_DELETE_IP:
sctp_notify_peer_addr_change(stcb, SCTP_ADDR_REMOVED, data,
- error);
+ error, so_locked);
break;
case SCTP_NOTIFY_ASCONF_SET_PRIMARY:
sctp_notify_peer_addr_change(stcb, SCTP_ADDR_MADE_PRIM, data,
- error);
+ error, so_locked);
break;
case SCTP_NOTIFY_PEER_SHUTDOWN:
sctp_notify_shutdown_event(stcb);
More information about the svn-src-all
mailing list