Date: Sun, 24 Feb 2002 16:03:34 -0800 (PST) From: Ian Dowse <iedowse@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern uipc_usrreq.c Message-ID: <200202250003.g1P03YD39234@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202250003.g1P03YD39234>