aboutsummaryrefslogtreecommitdiffstats
path: root/net/phonet
diff options
context:
space:
mode:
authorRémi Denis-Courmont <remi.denis-courmont@nokia.com>2009-10-15 12:29:14 -0700
committerDavid S. Miller <davem@davemloft.net>2009-10-15 12:30:42 -0700
commit21912d1ca2546ca96743c91d5a4125aef2d9df70 (patch)
tree7eb4356b1156b8cbe3ca6d1249603300127266b2 /net/phonet
parentb2d76447dfb8c695324c61c87f63e414f44fce5a (diff)
downloadkernel_samsung_smdk4412-21912d1ca2546ca96743c91d5a4125aef2d9df70.zip
kernel_samsung_smdk4412-21912d1ca2546ca96743c91d5a4125aef2d9df70.tar.gz
kernel_samsung_smdk4412-21912d1ca2546ca96743c91d5a4125aef2d9df70.tar.bz2
Phonet: hold socket before giving it to sk_deliver_skb()
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/phonet')
-rw-r--r--net/phonet/socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/phonet/socket.c b/net/phonet/socket.c
index 8c84190..0412beb 100644
--- a/net/phonet/socket.c
+++ b/net/phonet/socket.c
@@ -112,8 +112,10 @@ void pn_deliver_sock_broadcast(struct net *net, struct sk_buff *skb)
continue;
clone = skb_clone(skb, GFP_ATOMIC);
- if (clone)
+ if (clone) {
+ sock_hold(sknode);
sk_receive_skb(sknode, clone, 0);
+ }
}
spin_unlock(&pnsocks.lock);
}