On Mon, Aug 08, 2016 at 06:14:40PM +0200, ggar...@abra.uab.cat wrote:
> +static int __vsock_deliver_tap_skb(struct sk_buff *skb,
> +                                  struct net_device *dev)
> +{
> +     int ret = 0;
> +
> +     if (skb) {
> +             dev_hold(dev);
> +             /* Take skb ownership so it is not consumed in dev_queue_xmit.
> +              * dev_queue_xmit will drop a reference so the reference count
> +              * will reset.
> +              */
> +             skb_get(skb);

Netlink clones the skb instead of adding a reference.  I guess this is
because the skb might be modified later on?  Perhaps there are race
conditions if the original skb is shared.

Attachment: signature.asc
Description: PGP signature

Reply via email to