Subject: Re: Kernel panic eth2 mirred redirect to ifb0

From: Paweł Staszewski <[email-masked]>
Date: Mon, 20 Dec 2010 13:07:57 +0100

W dniu 2010-12-20 12:58, Jarek Poplawski pisze:
> On Mon, Dec 20, 2010 at 11:11:41AM +0000, Jarek Poplawski wrote:
>> To tell the truth, Changli could assume we don't need to tell anything,
>> because this mirred skb is almost not shared (except the refcount ;-).
> Btw, since there was ifb involved, I doubt this skb could hit ixgbe
> xmit before unsharing, and patching the driver could matter. Anyway,
> Changli, I guess, Pawel needs some instructions on this last patch?
>
> Jarek P.
>
>
With this patch:

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index ca9036d..602cd32 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -6096,6 +6096,15 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter,
  	u32 mss_l4len_idx, l4len;

  	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);
+			skb = nskb;
+		}
  		if (skb_header_cloned(skb)) {
  			err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
  			if (err)

I have the same panic as without.

This patch was added to clean 2.6.37-rc6 - without previous patch for 
sch_generic.h

Attached image with kernel panic.

Thanks
Pawel