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
1 changed files with 3 additions and 1 deletions
|
@ -112,8 +112,10 @@ void pn_deliver_sock_broadcast(struct net *net, struct sk_buff *skb)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
clone = skb_clone(skb, GFP_ATOMIC);
|
clone = skb_clone(skb, GFP_ATOMIC);
|
||||||
if (clone)
|
if (clone) {
|
||||||
|
sock_hold(sknode);
|
||||||
sk_receive_skb(sknode, clone, 0);
|
sk_receive_skb(sknode, clone, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
spin_unlock(&pnsocks.lock);
|
spin_unlock(&pnsocks.lock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue