diff options
author | georges <none@none> | 2006-09-13 09:42:23 -0700 |
---|---|---|
committer | georges <none@none> | 2006-09-13 09:42:23 -0700 |
commit | c62a497d57b723da895936c9a5d3b193efe0a3e2 (patch) | |
tree | 451ba9e19df55bbc2ad18cf4021f6c444fe84388 /usr/src | |
parent | 264a6e7478846334593be7663fb6b1a8f37784a0 (diff) | |
download | illumos-joyent-c62a497d57b723da895936c9a5d3b193efe0a3e2.tar.gz |
6450585 Panic due to racing netstat or ifconfig processes
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/inet/udp/udp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr/src/uts/common/inet/udp/udp.c b/usr/src/uts/common/inet/udp/udp.c index 3813f962a0..aa38e5ad71 100644 --- a/usr/src/uts/common/inet/udp/udp.c +++ b/usr/src/uts/common/inet/udp/udp.c @@ -1960,16 +1960,21 @@ udp_close(queue_t *q) ASSERT(udp->udp_rcv_list_head == NULL); ASSERT(udp->udp_rcv_list_tail == NULL); - /* connp is now single threaded. */ udp_close_free(connp); + /* - * Restore connp as an IP endpoint. We don't need - * any locks since we are now single threaded + * Restore connp as an IP endpoint. + * Locking required to prevent a race with udp_snmp_get()/ + * ipcl_get_next_conn(), which selects conn_t which are + * IPCL_UDP and not CONN_CONDEMNED. */ + mutex_enter(&connp->conn_lock); connp->conn_flags &= ~IPCL_UDP; connp->conn_state_flags &= ~(CONN_CLOSING | CONN_CONDEMNED | CONN_QUIESCED); connp->conn_ulp_labeled = B_FALSE; + mutex_exit(&connp->conn_lock); + return (0); } |