aboutsummaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorDavid S. Miller2011-05-19 15:55:45 -0400
committerDavid S. Miller2011-05-19 15:55:45 -0400
commit6b60d7b9df727726dfb7e59ca0a7caf14e81e0a2 (patch)
tree8a10fdde837d105b9cd6f5d59dc0fa31081236ee /net/core
parenta48eff128865aa20520fa6e0e0c5fbd2ac50d712 (diff)
parentabb57ea48fd9431fa320a5c55f73e6b5a44c2efb (diff)
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);