summaryrefslogtreecommitdiffstats
path: root/net/sctp/input.c
diff options
context:
space:
mode:
authorDmitry Mishin <dim@openvz.org>2006-09-01 00:28:39 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-23 00:18:47 +0200
commitfda9ef5d679b07c9d9097aaf6ef7f069d794a8f9 (patch)
tree6a265dc2038bc5568c5a499e6c8d4733650ed3f7 /net/sctp/input.c
parent[IPV6] MIP6: Fix to update IP6CB when cloned skbuff is received at HAO. (diff)
downloadlinux-fda9ef5d679b07c9d9097aaf6ef7f069d794a8f9.tar.xz
linux-fda9ef5d679b07c9d9097aaf6ef7f069d794a8f9.zip
[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>
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r--net/sctp/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 8a34d95602ce..03f65de75d88 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -228,7 +228,7 @@ int sctp_rcv(struct sk_buff *skb)
goto discard_release;
nf_reset(skb);
- if (sk_filter(sk, skb, 1))
+ if (sk_filter(sk, skb))
goto discard_release;
/* Create an SCTP packet structure. */