]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a deadlock in the getpeername() method for UNIX domain sockets.
authorjhb <jhb@FreeBSD.org>
Thu, 18 Jun 2009 20:56:22 +0000 (20:56 +0000)
committerjhb <jhb@FreeBSD.org>
Thu, 18 Jun 2009 20:56:22 +0000 (20:56 +0000)
commitb74ac99a510b71d1e4f9b640cf1f084052e00d45
tree90162d4bd71f58d1046f15655d9a3a0f301a7a9a
parentf3a1b951fc132d7220b5d5bdb2890f68143a229f
Fix a deadlock in the getpeername() method for UNIX domain sockets.
Instead of locking the local unp followed by the remote unp, use the same
locking model as accept() and read lock the global link lock followed by
the remote unp while fetching the remote sockaddr.

Reported by: Mel Flynn  mel.flynn of mailing.thruhere.net
Reviewed by: rwatson
MFC after: 1 week
sys/kern/uipc_usrreq.c