All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Paul Moore <paul.moore@hp.com>
Cc: David Miller <davem@davemloft.net>,
	jarkao2@gmail.com, hadi@cyberus.ca, netdev@vger.kernel.org
Subject: Re: [RFC PATCH] NET: Clone the sk_buff->iif field properly
Date: Thu, 03 Jan 2008 15:40:07 -0800	[thread overview]
Message-ID: <1199403607.4888.6.camel@localhost> (raw)
In-Reply-To: <200801031813.57621.paul.moore@hp.com>

On Thu, 2008-01-03 at 18:13 -0500, Paul Moore wrote:
> static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff 
> *skb)
> {
> #define C(x) n->x = skb->x
> 
> 	n->next = n->prev = NULL;
> 	n->sk = NULL;
> 	__copy_skb_header(n, skb);
> 
> 	C(len);
> 	C(data_len);
> 	C(mac_len);
> 	n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len;
> 	n->cloned = 1;
> 	n->nohdr = 0;
> 	n->destructor = NULL;
> 	C(iif);
> 	C(tail);
> 	C(end);
> 	C(head);
> 	C(data);
> 	C(truesize);
> 	atomic_set(&n->users, 1);
> 
> 	atomic_inc(&(skb_shinfo(skb)->dataref));
> 	skb->cloned = 1;
> 
> 	return n;
> #undef C

Perhaps move the skb->cloned = 1 to just after n->cloned = 1
or
	skb->cloned = n->cloned = 1;
or maybe
	skb->cloned = 1;
	C(cloned);


  parent reply	other threads:[~2008-01-03 23:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02 16:01 [RFC PATCH] NET: Clone the sk_buff->iif field properly Paul Moore
2008-01-03  9:58 ` Jarek Poplawski
2008-01-03 11:23   ` jamal
2008-01-03 14:01     ` Paul Moore
2008-01-03 16:15     ` Paul Moore
2008-01-03 21:13       ` Jarek Poplawski
2008-01-03 21:20         ` Paul Moore
2008-01-03 22:06           ` Jarek Poplawski
2008-01-03 22:49             ` Jarek Poplawski
2008-01-03 23:05           ` David Miller
2008-01-03 23:13             ` Paul Moore
2008-01-03 23:25               ` David Miller
2008-01-03 23:40               ` Joe Perches [this message]
2008-01-04  3:19                 ` Paul Moore
2008-01-04  3:36                   ` David 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=1199403607.4888.6.camel@localhost \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=jarkao2@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.moore@hp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.