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 ...
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Apr 9 09:07:05 UTC 2006
On Sat, Apr 01, 2006 at 03:42:02PM +0000, Robert Watson wrote:
+> rwatson 2006-04-01 15:42:02 UTC
+> FreeBSD src repository
+> Modified files:
+> sys/kern uipc_socket.c uipc_socket2.c
+> sys/net raw_cb.c raw_usrreq.c rtsock.c
+> sys/netatalk ddp_usrreq.c
+> sys/netatm atm_aal5.c atm_socket.c atm_usrreq.c
+> sys/netgraph ng_socket.c
+> sys/netgraph/bluetooth/include ng_btsocket_hci_raw.h
+> sys/netgraph/bluetooth/socket ng_btsocket_hci_raw.c
+> sys/netinet ip_divert.c raw_ip.c tcp_usrreq.c
+> sys/netinet6 raw_ip6.c udp6_usrreq.c
+> sys/netipsec keysock.c
+> sys/netipx ipx_usrreq.c spx_usrreq.c
+> sys/netkey keysock.c
+> sys/netnatm natm.c
+> sys/sys protosw.h
+> 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.
+> 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.
+> Protocol detach routines no longer try to free the socket on detach,
+> this is performed in the socket code if the protocol permits it.
+> In rts_detach(), no longer test for rp != 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.
+> 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 = sotongpcb(so);
+> - if (pcbp == NULL)
+> - return (EINVAL);
+> + KASSERT(pcbp == NULL, ("ngd_detach: pcbp == NULL"));
From what I see, it should be:
KASSERT(pcbp != NULL, ("ngd_detach: pcbp == NULL"));
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20060409/be2abc74/attachment.pgp
More information about the cvs-src