mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00: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 <dim@openvz.org> Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: Kirill Korotaev <dev@openvz.org>
This commit is contained in:
parent
dc435e6dac
commit
fda9ef5d67
10 changed files with 61 additions and 71 deletions
|
@ -1104,7 +1104,7 @@ process:
|
|||
goto discard_and_relse;
|
||||
nf_reset(skb);
|
||||
|
||||
if (sk_filter(sk, skb, 0))
|
||||
if (sk_filter(sk, skb))
|
||||
goto discard_and_relse;
|
||||
|
||||
skb->dev = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue