Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115727423
D39855.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
814 B
Referenced Files
None
Subscribers
None
D39855.diff
View Options
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -885,15 +885,10 @@
KASSERT(unp != NULL, ("uipc_peeraddr: unp == NULL"));
*nam = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK);
- UNP_LINK_RLOCK();
- /*
- * XXX: It seems that this test always fails even when connection is
- * established. So, this else clause is added as workaround to
- * return PF_LOCAL sockaddr.
- */
- unp2 = unp->unp_conn;
+
+ UNP_PCB_LOCK(unp);
+ unp2 = unp_pcb_lock_peer(unp);
if (unp2 != NULL) {
- UNP_PCB_LOCK(unp2);
if (unp2->unp_addr != NULL)
sa = (struct sockaddr *) unp2->unp_addr;
else
@@ -904,7 +899,7 @@
sa = &sun_noname;
bcopy(sa, *nam, sa->sa_len);
}
- UNP_LINK_RUNLOCK();
+ UNP_PCB_UNLOCK(unp);
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 28, 6:44 PM (11 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17832638
Default Alt Text
D39855.diff (814 B)
Attached To
Mode
D39855: unix: Fix locking in uipc_peeraddr()
Attached
Detach File
Event Timeline
Log In to Comment