From: Daniel Borkmann <dan...@iogearbox.net>
Date: Thu, 31 Mar 2016 14:16:18 +0200

> On 03/31/2016 01:59 PM, Eric Dumazet wrote:
>> On Thu, 2016-03-31 at 13:35 +0200, Daniel Borkmann wrote:
>>
>>> +static inline bool sock_owned_externally(const struct sock *sk)
>>> +{
>>> +   return sk->sk_flags & (1UL << SOCK_EXTERNAL_OWNER);
>>> +}
>>> +
>>
>> Have you reinvented sock_flag(sl, SOCK_EXTERNAL_OWNER) ? ;)
>>
>> Anyway, using a flag for this purpose sounds overkill to me.
> 
> Right.
> 
>> Setting it is a way to 'fool' lockdep anyway...
> 
> Yep, correct, we'd be fooling the tun case, so this diff doesn't
> really make it any better there.

I like the currently proposed patch where TUN says that RTNL is what
the synchronizing element is.

Maybe we could make a helper of some sort but since we only have once
case like this is just overkill.

Alexei, do you really mind if I apply Danile's patch?

Thanks.

Reply via email to