svn commit: r365788 - head/sys/kern
Mark Johnston
markj at FreeBSD.org
Tue Sep 15 23:03:57 UTC 2020
Author: markj
Date: Tue Sep 15 23:03:56 2020
New Revision: 365788
URL: https://svnweb.freebsd.org/changeset/base/365788
Log:
Fix locking in uipc_accept().
Reported by: cy
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/kern/uipc_usrreq.c
Modified: head/sys/kern/uipc_usrreq.c
==============================================================================
--- head/sys/kern/uipc_usrreq.c Tue Sep 15 22:19:16 2020 (r365787)
+++ head/sys/kern/uipc_usrreq.c Tue Sep 15 23:03:56 2020 (r365788)
@@ -506,7 +506,10 @@ uipc_accept(struct socket *so, struct sockaddr **nam)
else
sa = &sun_noname;
bcopy(sa, *nam, sa->sa_len);
- unp_pcb_unlock_pair(unp, unp2);
+ if (unp2 != NULL)
+ unp_pcb_unlock_pair(unp, unp2);
+ else
+ UNP_PCB_UNLOCK(unp);
return (0);
}
More information about the svn-src-head
mailing list