forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
b2d76447df
commit
21912d1ca2
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user