[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJmB2rBid27YYT4f6vMtBf9EMFWZQgT=xO85z4OBz326pUT+4A@mail.gmail.com>
Date: Thu, 1 Sep 2011 13:26:02 +0400
From: Alexander Smirnov <alex.bluesman.smirnov@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Dan Carpenter <error27@...il.com>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
Sergey Lapin <slapin@...fans.org>,
"David S. Miller" <davem@...emloft.net>,
"open list:IEEE 802.15.4 SUB..."
<linux-zigbee-devel@...ts.sourceforge.net>,
"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree()
Hi Dan, Eric,
thank you a lot for the finds, that were my faults.
With best regards,
Alexander
2011/8/30 Eric Dumazet <eric.dumazet@...il.com>:
> Le mardi 30 août 2011 à 16:45 +0300, Dan Carpenter a écrit :
>> Use kfree_skb() to free sbk_buffs.
>>
>> Signed-off-by: Dan Carpenter <error27@...il.com>
>>
>> diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
>> index cf304cc..8a9dbaa 100644
>> --- a/net/ieee802154/6lowpan.c
>> +++ b/net/ieee802154/6lowpan.c
>> @@ -674,7 +674,7 @@ lowpan_process_data(struct sk_buff *skb)
>> sizeof(hdr));
>> return lowpan_skb_deliver(skb, &hdr);
>> drop:
>> - kfree(skb);
>> + kfree_skb(skb);
>> return -EINVAL;
>> }
>>
>
> Another bug is the skb_copy() done in lowpan_skb_deliver()
>
> 1) No check of skb_copy() return
>
> 2.1) Use of GFP_KERNEL : Is it safe at this point ? Aren’t we in
> softirq ?
>
> 2.2) If GFP_KERNEL is safe, why do we later do :
>
> if (in_interrupt())
> stat = netif_rx(skb);
> else
> stat = netif_rx_ni(skb);
>
>
>
>
--
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