From owner-cvs-all Sun Feb 24 16: 3:42 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0E5DE37B400; Sun, 24 Feb 2002 16:03:35 -0800 (PST) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1P03YD39234; Sun, 24 Feb 2002 16:03:34 -0800 (PST) (envelope-from iedowse) Message-Id: <200202250003.g1P03YD39234@freefall.freebsd.org> From: Ian Dowse Date: Sun, 24 Feb 2002 16:03:34 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern uipc_usrreq.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iedowse 2002/02/24 16:03:34 PST Modified files: sys/kern uipc_usrreq.c Log: Sockets passed into uipc_abort() have been allocated by sonewconn() but never accept'ed, so they must be destroyed. Originally, unp_drop() detected this situation by checking if so->so_head is non-NULL. However, since revision 1.54 of uipc_socket.c (Feb 1999), so->so_head is set to NULL before calling soabort(), so any unix-domain sockets waiting to be accept'ed are leaked if the server socket is closed. Resolve this by moving the socket destruction code into uipc_abort() itself, and making it unconditional (the other caller of unp_drop() never needs the socket to be destroyed). Use unp_detach() to avoid the original code duplication when destroying the socket. PR: kern/17895 Reviewed by: dwmalone (an earlier version of the patch) MFC after: 1 week Revision Changes Path 1.81 +2 -10 src/sys/kern/uipc_usrreq.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message