Re: FYI: merging TCP, UDP, netisr locking changes

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Thu, 2 Jun 2011 04:57:09 +0000
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_at_, 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)
_at__at_ -1158,7 +1158,7 _at__at_ 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.
Received on Thu Jun 02 2011 - 02:57:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:14 UTC