Date: Sun, 9 Apr 2006 11:05:41 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_socket.c uipc_socket2.c uipc_usrreq.c src/sys/net raw_cb.c raw_usrreq.c rtsock.c src/sys/netatalk ddp_usrreq.c src/sys/netatm atm_aal5.c atm_socket.c atm_usrreq.c atm_var.h src/sys/netgraph ng_socket.c ... Message-ID: <20060409090541.GG2135@garage.freebsd.pl> In-Reply-To: <200604011542.k31Fg2B3020856@repoman.freebsd.org> References: <200604011542.k31Fg2B3020856@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--/i8j2F0k9BYX4qLc Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 01, 2006 at 03:42:02PM +0000, Robert Watson wrote: +> rwatson 2006-04-01 15:42:02 UTC +>=20 +> FreeBSD src repository +>=20 +> Modified files: +> sys/kern uipc_socket.c uipc_socket2.c=20 +> uipc_usrreq.c=20 +> sys/net raw_cb.c raw_usrreq.c rtsock.c=20 +> sys/netatalk ddp_usrreq.c=20 +> sys/netatm atm_aal5.c atm_socket.c atm_usrreq.c=20 +> atm_var.h=20 +> sys/netgraph ng_socket.c=20 +> sys/netgraph/bluetooth/include ng_btsocket_hci_raw.h=20 +> ng_btsocket_l2cap.h=20 +> ng_btsocket_rfcomm.h=20 +> sys/netgraph/bluetooth/socket ng_btsocket_hci_raw.c=20 +> ng_btsocket_l2cap.c=20 +> ng_btsocket_l2cap_raw.c=20 +> ng_btsocket_rfcomm.c=20 +> sys/netinet ip_divert.c raw_ip.c tcp_usrreq.c=20 +> udp_usrreq.c=20 +> sys/netinet6 raw_ip6.c udp6_usrreq.c=20 +> sys/netipsec keysock.c=20 +> sys/netipx ipx_usrreq.c spx_usrreq.c=20 +> sys/netkey keysock.c=20 +> sys/netnatm natm.c=20 +> sys/sys protosw.h=20 +> Log: +> Chance protocol switch method pru_detach() so that it returns void +> rather than an error. Detaches do not "fail", they other occur or +> the protocol flags SS_PROTOREF to take ownership of the socket. +> =20 +> soclose() no longer looks at so_pcb to see if it's NULL, relying +> entirely on the protocol to decide whether it's time to free the +> socket or not using SS_PROTOREF. so_pcb is now entirely owned and +> managed by the protocol code. Likewise, no longer test so_pcb in +> other socket functions, such as soreceive(), which have no business +> digging into protocol internals. +> =20 +> Protocol detach routines no longer try to free the socket on detach, +> this is performed in the socket code if the protocol permits it. +> =20 +> In rts_detach(), no longer test for rp !=3D NULL in detach, and +> likewise in other protocols that don't permit a NULL so_pcb, reduce +> the incidence of testing for it during detach. +> =20 +> netinet and netinet6 are not fully updated to this change, which +> will be in an upcoming commit. In their current state they may leak +> memory or panic. [...] +> -static int +> +static void +> ngd_detach(struct socket *so) +> { +> struct ngpcb *const pcbp =3D sotongpcb(so); +> =20 +> - if (pcbp =3D=3D NULL) +> - return (EINVAL); +> + KASSERT(pcbp =3D=3D NULL, ("ngd_detach: pcbp =3D=3D NULL")); From what I see, it should be: KASSERT(pcbp !=3D NULL, ("ngd_detach: pcbp =3D=3D NULL")); --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --/i8j2F0k9BYX4qLc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEOM5lForvXbEpPzQRAreOAJ9a9psgaFmbANg6EmF1w/tlm2AlpACgoVXx 7L2ZcjkiivTfmamiOd0UGCY= =QqzY -----END PGP SIGNATURE----- --/i8j2F0k9BYX4qLc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060409090541.GG2135>