Subject: Re: [PATCH] Handle shared SKBs in VLAN receive code

From: "David S. Miller" <[email-masked]>
Date: Mon, 13 Oct 2003 10:19:35 -0700

On Sun, 12 Oct 2003 12:00:09 +0200
Tommy Christensen <[email-masked]> wrote:

> Bear with me, but this is how I understand it:
> 
>   - The sk_buff *structure* is read-only on a shared SKB.
>     skb_share_check(skb) breaks the sharing, thus allowing
>     updates of skb->dev, skb->len etc.
>     But the SKB still points at the same data buffer.
> 
>   - The *data* buffer is read-only on a cloned SKB.
>     skb_cow() or skb_copy() or ... gives us a writeable buffer.

skb_copy() makes both the struct sk_buff and the data it points
to unique and yours alone to modify however you wish.