summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-19 21:55:45 +0200
committerDavid S. Miller <davem@davemloft.net>2011-05-19 21:55:45 +0200
commit6b60d7b9df727726dfb7e59ca0a7caf14e81e0a2 (patch)
tree8a10fdde837d105b9cd6f5d59dc0fa31081236ee /net/core
parentipv4: Pass explicit destination address to rt_bind_peer(). (diff)
parentnet: add skb_dst_force() in sock_queue_err_skb() (diff)
downloadlinux-6b60d7b9df727726dfb7e59ca0a7caf14e81e0a2.tar.xz
linux-6b60d7b9df727726dfb7e59ca0a7caf14e81e0a2.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/core')
-rw-r--r--net/core/skbuff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 7ebeed0a877c..3e934fe96f29 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2993,6 +2993,9 @@ int sock_queue_err_skb(struct sock *sk, struct sk_buff *skb)
skb->destructor = sock_rmem_free;
atomic_add(skb->truesize, &sk->sk_rmem_alloc);
+ /* before exiting rcu section, make sure dst is refcounted */
+ skb_dst_force(skb);
+
skb_queue_tail(&sk->sk_error_queue, skb);
if (!sock_flag(sk, SOCK_DEAD))
sk->sk_data_ready(sk, skb->len);