Re: [PATCH] fix sk->sk_filter field access
From: David Miller <davem@davemloft.net>
Date: 2006-08-31 22:29:47
From: Dmitry Mishin <redacted> Date: Wed, 30 Aug 2006 17:07:14 +0400
Function sk_filter() is called from tcp_v{4,6}_rcv() functions with argue
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.
Patch is for net-2.6.19
Signed-off-by: Dmitry Mishin <redacted>
Signed-off-by: Alexey Kuznetsov <redacted>
Signed-off-by: Kirill Korotaev <redacted>Dmitry, your email client chopped up the longer lines in the patch such as:
-static inline int sk_filter(struct sock *sk, struct sk_buff *skb, int needlock) +static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
Here.
-static inline unsigned run_filter(struct sk_buff *skb, struct sock *sk, unsigned res) +static inline int run_filter(struct sk_buff *skb, struct sock *sk,
And there. But I fixed these up and applied the patch to net-2.6.19 I think we seriously need to think about fixing this bug, in so me form, for 2.6.18