public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Changli Gao <xiaosuo@gmail.com>
Cc: "Paweł Staszewski" <pstaszewski@itcare.pl>,
	"David S. Miller" <davem@davemloft.net>,
	"Jarek Poplawski" <jarkao2@gmail.com>,
	"Linux Network Development list" <netdev@vger.kernel.org>
Subject: Re: Kernel panic eth2 mirred redirect to ifb0
Date: Mon, 20 Dec 2010 10:08:17 +0100	[thread overview]
Message-ID: <1292836097.2800.3.camel@edumazet-laptop> (raw)
In-Reply-To: <AANLkTim1YZd0FgunGKN_YPiLW+uExXajwingUkQeW=a=@mail.gmail.com>

Le lundi 20 décembre 2010 à 16:56 +0800, Changli Gao a écrit :
> 2010/12/20 Paweł Staszewski <pstaszewski@itcare.pl>:
> >>
> > Yes reverting this patch solves the problem.
> >
> >
> 
> I am not sure reverting is the right fix. Maybe you can try this patch
> attached instead.
> 
> BTW: there are some others NIC drivers and net_sched actions don't
> take care of shared skbs.
> 

This patch cant be right as is.

        if (skb_is_gso(skb)) {
+               if (skb_shared(skb)) {
+                       struct sk_buff *nskb;
+
+                       nskb = skb_clone(skb, GFP_ATOMIC);
+                       if (!nskb)
+                               return -ENOMEM;
+                       kfree_skb(skb); // HERE
+                       skb = nskb;
+               }

You free original skb, while caller might dereference it later.
So you must pass cloned skb back to caller.

(line 6393 :)
 count = ixgbe_tx_map(adapter, tx_ring, skb, tx_flags, first);




  reply	other threads:[~2010-12-20  9:08 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-19 11:35 Kernel panic eth2 mirred redirect to ifb0 Paweł Staszewski
2010-12-19 11:39 ` Paweł Staszewski
2010-12-19 15:43 ` Eric Dumazet
2010-12-19 16:09   ` Paweł Staszewski
2010-12-19 16:22     ` Changli Gao
2010-12-19 20:34       ` Paweł Staszewski
2010-12-19 22:15         ` Jarek Poplawski
2010-12-19 22:21           ` Jarek Poplawski
2010-12-19 22:26             ` Jarek Poplawski
2010-12-20  8:01               ` Paweł Staszewski
2010-12-20  8:06                 ` Eric Dumazet
2010-12-20  9:13                   ` Paweł Staszewski
2010-12-20  8:56                 ` Changli Gao
2010-12-20  9:08                   ` Eric Dumazet [this message]
2010-12-20  9:11                     ` Changli Gao
2010-12-20  9:21                       ` Eric Dumazet
2010-12-20 10:32                         ` Jarek Poplawski
2010-12-20 10:41                           ` Eric Dumazet
2010-12-20 11:11                             ` Jarek Poplawski
2010-12-20 11:58                               ` Jarek Poplawski
2010-12-20 12:07                                 ` Paweł Staszewski
2010-12-20 12:22                                   ` Jarek Poplawski
2010-12-20 12:45                                     ` Eric Dumazet
2010-12-20 12:54                                       ` Eric Dumazet
2010-12-20 13:02                                         ` Jarek Poplawski
2010-12-20 14:05                                           ` Changli Gao
2010-12-20 14:25                                             ` [PATCH net-next-2.6] ifb: add performance flags to dev->features Eric Dumazet
2010-12-20 14:43                                               ` Changli Gao
2010-12-28 21:50                                               ` David Miller
2010-12-28 22:36                                                 ` Eric Dumazet
2010-12-28 23:07                                                   ` Jarek Poplawski
2011-01-02 20:24                                                     ` [PATCH v2 net-next-2.6] ifb: add performance flags Eric Dumazet
2011-01-03 19:37                                                       ` Jarek Poplawski
2011-01-03 19:40                                                         ` David Miller
2011-01-03 20:35                                                           ` Eric Dumazet
2011-01-03 20:40                                                             ` David Miller
2010-12-20 12:30                                   ` Kernel panic eth2 mirred redirect to ifb0 Changli Gao
2010-12-20 13:37                                     ` Jarek Poplawski

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=1292836097.2800.3.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jarkao2@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pstaszewski@itcare.pl \
    --cc=xiaosuo@gmail.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