mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[NET]: Fix sk->sk_filter field access
Function sk_filter() is called from tcp_v{4,6}_rcv() functions with arg
needlock = 0, while socket is not locked at that moment. In order to avoid
this and similar issues in the future, use rcu for sk->sk_filter field read
protection.
Signed-off-by: Dmitry Mishin <[email protected]>
Signed-off-by: Alexey Kuznetsov <[email protected]>
Signed-off-by: Kirill Korotaev <[email protected]>
This commit is contained in:
parent
dc435e6dac
commit
fda9ef5d67
10 changed files with 61 additions and 71 deletions
|
|
@ -586,7 +586,7 @@ static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig
|
|||
goto out;
|
||||
}
|
||||
|
||||
err = sk_filter(sk, skb, 0);
|
||||
err = sk_filter(sk, skb);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue