mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
net: add __rcu annotation to sk_filter
Add __rcu annotation to :
(struct sock)->sk_filter
And use appropriate rcu primitives to reduce sparse warnings if
CONFIG_SPARSE_RCU_POINTER=y
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
1c87733d06
commit
0d7da9ddd9
6 changed files with 7 additions and 7 deletions
|
|
@ -373,7 +373,7 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr,
|
|||
|
||||
static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
|
||||
{
|
||||
if ((raw6_sk(sk)->checksum || sk->sk_filter) &&
|
||||
if ((raw6_sk(sk)->checksum || rcu_dereference_raw(sk->sk_filter)) &&
|
||||
skb_checksum_complete(skb)) {
|
||||
atomic_inc(&sk->sk_drops);
|
||||
kfree_skb(skb);
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
|
|||
}
|
||||
}
|
||||
|
||||
if (sk->sk_filter) {
|
||||
if (rcu_dereference_raw(sk->sk_filter)) {
|
||||
if (udp_lib_checksum_complete(skb))
|
||||
goto drop;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue