diff --git a/include/net/sock.h b/include/net/sock.h index 67e35c7e230c42a08bb718e6508d3826dbbe6cdd..6e1542da33a1ae26ddc93b80a2071401c6f73c09 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -944,7 +944,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb) return err; rcu_read_lock_bh(); - filter = sk->sk_filter; + filter = rcu_dereference(sk->sk_filter); if (filter) { unsigned int pkt_len = sk_run_filter(skb, filter->insns, filter->len);