netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tommy Christensen <tommy.christensen@tpack.net>
To: "David S. Miller" <davem@redhat.com>
Cc: Ben Greear <greearb@candelatech.com>, netdev@oss.sgi.com
Subject: Re: [PATCH] Handle shared SKBs in VLAN receive code
Date: Sun, 12 Oct 2003 12:00:09 +0200	[thread overview]
Message-ID: <3F892629.7090206@tpack.net> (raw)
In-Reply-To: 20031011120339.0da631e6.davem@redhat.com

David S. Miller wrote:

> The current code is correct and handles shared SKBs properly,
> so I don't think it's worth playing around with this much more.

No, it is still not right.

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.

The tcpdump problem was caused by violating the second rule,
this is now fixed.

But the code still doesn't follow the first rule, which is
what this patch fixes.


-Tommy

  parent reply	other threads:[~2003-10-12 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-10 23:38 [PATCH] Handle shared SKBs in VLAN receive code Tommy Christensen
2003-10-10 23:52 ` Ben Greear
2003-10-11  0:09   ` Tommy Christensen
2003-10-11 19:03     ` Ben Greear
2003-10-11 19:03       ` David S. Miller
2003-10-11 19:55         ` Ben Greear
2003-10-11 19:54           ` David S. Miller
2003-10-12 10:00         ` Tommy Christensen [this message]
2003-10-13 17:19           ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F892629.7090206@tpack.net \
    --to=tommy.christensen@tpack.net \
    --cc=davem@redhat.com \
    --cc=greearb@candelatech.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).