On Thu, Apr 07, 2016 at 11:37:10AM -0700, Cong Wang wrote: > You are lost in discussion Indeed. :(
> > I still think it is okay without the lock, because even if you take the lock, > the pmtu update could still happen after you release it, so there is no > essential difference here. The only reason I can think of for taking > the sock lock is protecting parallel pmtu update, but it looks safe for > this case too. > > So which case do you want to protect by taking the sock lock? When the pmtu-update is doing route lookup and another connect is happening, what sk->sk_v6_daddr will this route lookup use? the old one, new one or neither of them? Is it acceptable that getsockopt() is returning something that it is not currently connected to? and potentially somewhere that it is never connected to?