Commit 9d3e4442 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

[SOCK]: Adds a rcu_dereference() in sk_filter

It seems commit fda9ef5d

 introduced a RCU 
protection for sk_filter(), without a rcu_dereference()

Either we need a rcu_dereference(), either a comment should explain why we 
dont need it. I vote for the former.

Signed-off-by: default avatarEric Dumazet <>
Acked-by: default avatarHerbert Xu <>
Signed-off-by: default avatarDavid S. Miller <>
parent 0f99be0d
......@@ -944,7 +944,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
return err;
filter = sk->sk_filter;
filter = rcu_dereference(sk->sk_filter);
if (filter) {
unsigned int pkt_len = sk_run_filter(skb, filter->insns,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment