diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2021-10-30 16:35:32 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2021-10-30 16:35:32 +0000 |
commit | a8538665d5b22f1fa88d61c5df3032dd59684611 (patch) | |
tree | 83825c24063589064c6aaa0d2d564b41a389f646 | |
parent | b5b7b7a16b36f1061338d9877b576eaa7dc1665b (diff) |
Kill the dead code from unp_drop().
The unp_drop() was removed from the 'PRU_ABORT' path in the previous
commit. Now it only remains in the unp_detach() where disconnects the
connected datagram sockets linked to the `unp_link' list. Such sockets
always have the associated file descriptor and never had been linked to
the `so_q0' or `so_q' of listening socket so their `so_head' is always
NULL.
ok millert@ sashan@ mpi@
-rw-r--r-- | sys/kern/uipc_usrreq.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index a90e88d5b07..0994f76abea 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.152 2021/10/30 16:24:18 mvs Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.153 2021/10/30 16:35:31 mvs Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -783,17 +783,6 @@ unp_drop(struct unpcb *unp, int errno) so->so_error = errno; unp_disconnect(unp); - if (so->so_head) { - so->so_pcb = NULL; - /* - * As long as `unp_lock' is taken before entering - * uipc_usrreq() releasing it here would lead to a - * double unlock. - */ - sofree(so, SL_NOUNLOCK); - m_freem(unp->unp_addr); - pool_put(&unpcb_pool, unp); - } } #ifdef notdef |