Subject: Re: Kernel panic eth2 mirred redirect to ifb0

From: Paweł Staszewski <[email-masked]>
Date: Sun, 19 Dec 2010 21:34:53 +0100

W dniu 2010-12-19 17:22, Changli Gao pisze:
> 2010/12/20 Paweł Staszewski<[email-masked]>:
>> W dniu 2010-12-19 16:43, Eric Dumazet pisze:
>>> Unfortunately, we miss the start of panic messages. Could you try to get
>>> them ?
>>>
>> In attached images
>>
> It seems the kernel panic at:
>
>          if (skb_shared(skb))
>                  BUG();
>
> in pskb_expand_head().
>
> It maybe related to my patch:
> http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=210d6de78c5d7c785fc532556cea340e517955e1
>
> You can try to revert it and test again.
>
> However, the bug is a misuse of pskb_expand_head().
>
patching file net/sched/act_mirred.c
Hunk #1 FAILED at 169.
Hunk #2 succeeded at 195 (offset 10 lines).
1 out of 2 hunks FAILED -- saving rejects to file net/sched/act_mirred.c.rej

***************
*** 169,181 ****
                 goto out;
         }

-       at = G_TC_AT(skb->tc_verd);
-       skb2 = skb_act_clone(skb, GFP_ATOMIC, m->tcf_action);
         if (skb2 == NULL)
                 goto out;

         m->tcf_bstats.bytes += qdisc_pkt_len(skb2);
         m->tcf_bstats.packets++;
         if (!(at & AT_EGRESS)) {
                 if (m->tcfm_ok_push)
                         skb_push(skb2, skb2->dev->hard_header_len);
--- 169,181 ----
                 goto out;
         }

+       skb2 = skb_act_clone(skb, GFP_ATOMIC);
         if (skb2 == NULL)
                 goto out;

         m->tcf_bstats.bytes += qdisc_pkt_len(skb2);
         m->tcf_bstats.packets++;
+       at = G_TC_AT(skb->tc_verd);
         if (!(at & AT_EGRESS)) {
                 if (m->tcfm_ok_push)
                         skb_push(skb2, skb2->dev->hard_header_len);

for sch_generic.h was ok.