From: mvs Date: Thu, 2 May 2024 17:10:55 +0000 (+0000) Subject: Don't re-lock sockets in uipc_shutdown(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=db2d50c399306fa5f4ec9e7ca1b40ac0056431fe;p=openbsd Don't re-lock sockets in uipc_shutdown(). No reason to lock peer. It can't be or became listening socket, both sockets can't be in the middle of connecting or disconnecting. ok bluhm --- diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index f506397f767..56228965d9a 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.204 2024/04/10 12:04:41 mvs Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.205 2024/05/02 17:10:55 mvs Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -459,9 +459,9 @@ uipc_shutdown(struct socket *so) socantsendmore(so); - if ((so2 = unp_solock_peer(unp->unp_socket))){ + if (unp->unp_conn != NULL) { + so2 = unp->unp_conn->unp_socket; socantrcvmore(so2); - sounlock(so2); } return (0);