udp: Fix bind races due to async close and random socket inital msgport
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 15 Nov 2015 14:02:55 +0000 (22:02 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 15 Nov 2015 14:24:00 +0000 (22:24 +0800)
commit296c350d3c63a181744b80a4b7973dac5fc162a3
treee69e3c27d4041e4a308a03fad81271240695aeb4
parent7c0074d8cdd77be9995119d234fe855f7c54dba0
udp: Fix bind races due to async close and random socket inital msgport

Bind for UDP sockets is now serialized by local port based netisr.  And
on detach path, the UDP inpcb is removed from local port hash before
other netisrs are synchronized, so that the local port for the detaching
UDP inpcb could be recycled timely.
sys/netinet/in_pcb.c
sys/netinet/in_pcb.h
sys/netinet/udp_usrreq.c