--- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -735,12 +735,7 @@ static inline int do_one_broadcast(struc sock_hold(sk); if (p->skb2 == NULL) { - if (atomic_read(&p->skb->users) != 1) { - p->skb2 = skb_clone(p->skb, p->allocation); - } else { - p->skb2 = p->skb; - atomic_inc(&p->skb->users); - } + p->skb2 = skb_clone(p->skb, p->allocation); } if (p->skb2 == NULL) { netlink_overrun(sk); @@ -776,7 +771,8 @@ int netlink_broadcast(struct sock *ssk, info.delivered = 0; info.allocation = allocation; info.skb = skb; - info.skb2 = NULL; + info.skb2 = skb; + skb_get(skb); /* While we sleep in clone, do not allow to change socket list */