FYI: merging TCP, UDP, netisr locking changes

Bjoern A. Zeeb bz at FreeBSD.org
Thu Jun 2 04:57:13 UTC 2011


On May 30, 2011, at 9:53 AM, Robert Watson wrote:

>> This work has been sponsored by Juniper Networks.  Thanks also to Bjoern Zeeb, who has been reviewing changes!

And pointy hat to me for missing this one:(


> After a series of smaller commits, I've just merged some initial decomposition of the pcbinfo lock into an additional pcbhash lock, which changes lock ordering and lookup with respect to inpcbs significantly (r222488; commit message below).  I expect there to be some initial instability as people shake out edge cases I didn't bump into in my testing.  Please report bugs to current@, and I'll pick them up there!

Can you review the following I found this morning on my IPv6 only
snapshot VM.  We need to make sure all the src/tools/regression test
cases equally run IPv6.  Patches certainly welcome from the community!

!
! Do not leak the pcbinfohash lock in case in6_pcbladdr() errors
! for a tcp connect on IPv6.
!
! Submitted by:	bz
!
Index: sys/netinet/tcp_usrreq.c
===================================================================
--- sys/netinet/tcp_usrreq.c    (revision 222591)
+++ sys/netinet/tcp_usrreq.c    (working copy)
@@ -1158,7 +1158,7 @@ tcp6_connect(struct tcpcb *tp, struct sockaddr *na
         */
        error = in6_pcbladdr(inp, nam, &addr6);
        if (error)
-               return error;
+               goto out;
        oinp = in6_pcblookup_hash_locked(inp->inp_pcbinfo,
                                  &sin6->sin6_addr, sin6->sin6_port,
                                  IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)


-- 
Bjoern A. Zeeb                                 You have to have visions!
         Stop bit received. Insert coin for new address family.



More information about the freebsd-current mailing list