Thread (20 messages) 20 messages, 7 authors, 2016-03-31

Re: [PATCH net] tun, bpf: fix suspicious RCU usage in tun_{attach,detach}_filter

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2016-03-31 21:53:08

On 03/31/2016 09:48 PM, Hannes Frederic Sowa wrote:
[...]
Tightest solution would probably be to combine both patches.

bool called_by_tuntap;

old_fp = rcu_dereference_protected(sk->sk_filter, called_by_tuntap ? lockdep_rtnl_is_held() : lockdep_sock_is_held());
If I understand you correctly with combining them, you mean you'd still
need the API change to pass the bool 'called_by_tuntap' down, right?

If so, your main difference is, after all, to replace the sock_owned_by_user()
with the lockdep_sock_is_held() construction instead, correct?

But then, isn't it already sufficient when you pass the bool itself down
that 'demuxes' in this case between the sock_owned_by_user() vs
lockdep_rtnl_is_held() check?

Thanks,
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help