[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=BHxP465epxWwsZxfVtL7yJOCDRjQ3sKdmSYDp@mail.gmail.com>
Date: Thu, 20 Jan 2011 23:43:17 +0800
From: Po-Yu Chuang <ratbert.chuang@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
bhutchings@...arflare.com, joe@...ches.com, dilinger@...ued.net,
Po-Yu Chuang <ratbert@...aday-tech.com>
Subject: Re: [PATCH v3] net: add Faraday FTMAC100 10/100 Ethernet driver
Dear Eric,
On Thu, Jan 20, 2011 at 11:35 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Le jeudi 20 janvier 2011 à 23:30 +0800, Po-Yu Chuang a écrit :
>
>> + /* push packet to protocol stack */
>> + netif_receive_skb(skb);
>> +
>> + netdev->stats.rx_packets++;
>> + netdev->stats.rx_bytes += skb->len;
>> +
>> + (*processed)++;
>> +
>> + return true;
>> +}
>> +
>
> Hmm, after call to netif_receive_skb(skb), you are not allowed to access
> skb anymore (maybe it was freed)
>
> netdev->stats.rx_packets++;
> netdev->stats.rx_bytes += skb->len;
> netif_receive_skb(skb);
Wow, you are totally right.
Thanks,
Po-Yu Chuang
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists