Commit 21912d1c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by David S. Miller

Phonet: hold socket before giving it to sk_deliver_skb()

Signed-off-by: default avatarRémi Denis-Courmont <remi.denis-courmont@nokia.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b2d76447
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment