* [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree()
@ 2011-08-30 13:45 Dan Carpenter
2011-08-30 14:40 ` Eric Dumazet
[not found] ` <20110830134552.GH3705-z0WHZYlhLlzP0Z7Jsv878P8+0UxHXcjY@public.gmane.org>
0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2011-08-30 13:45 UTC (permalink / raw)
To: Alexander Smirnov
Cc: Dmitry Eremin-Solenikov, Sergey Lapin, David S. Miller,
open list:IEEE 802.15.4 SUB..., open list:NETWORKING [GENERAL],
kernel-janitors
Use kfree_skb() to free sbk_buffs.
Signed-off-by: Dan Carpenter <error27@gmail.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;
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree()
2011-08-30 13:45 [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree() Dan Carpenter
@ 2011-08-30 14:40 ` Eric Dumazet
2011-09-01 9:26 ` Alexander Smirnov
[not found] ` <20110830134552.GH3705-z0WHZYlhLlzP0Z7Jsv878P8+0UxHXcjY@public.gmane.org>
1 sibling, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2011-08-30 14:40 UTC (permalink / raw)
To: Dan Carpenter
Cc: Alexander Smirnov, Dmitry Eremin-Solenikov, Sergey Lapin,
David S. Miller, open list:IEEE 802.15.4 SUB...,
open list:NETWORKING [GENERAL],
kernel-janitors
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@gmail.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);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree()
2011-08-30 14:40 ` Eric Dumazet
@ 2011-09-01 9:26 ` Alexander Smirnov
2011-09-01 15:04 ` Dan Carpenter
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Smirnov @ 2011-09-01 9:26 UTC (permalink / raw)
To: Eric Dumazet
Cc: Dan Carpenter, Dmitry Eremin-Solenikov, Sergey Lapin,
David S. Miller, open list:IEEE 802.15.4 SUB...,
open list:NETWORKING [GENERAL],
kernel-janitors
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@gmail.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@gmail.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);
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree()
2011-09-01 9:26 ` Alexander Smirnov
@ 2011-09-01 15:04 ` Dan Carpenter
2011-09-01 15:06 ` Dan Carpenter
0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2011-09-01 15:04 UTC (permalink / raw)
To: Alexander Smirnov
Cc: Eric Dumazet, Dmitry Eremin-Solenikov, Sergey Lapin,
David S. Miller, open list:IEEE 802.15.4 SUB...,
open list:NETWORKING [GENERAL],
kernel-janitors
On Thu, Sep 01, 2011 at 01:26:02PM +0400, Alexander Smirnov wrote:
> Hi Dan, Eric,
>
> thank you a lot for the finds, that were my faults.
>
So uh... You're going to send a patch to fix the things Eric
mentioned, right?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree()
2011-09-01 15:04 ` Dan Carpenter
@ 2011-09-01 15:06 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2011-09-01 15:06 UTC (permalink / raw)
To: Alexander Smirnov
Cc: Eric Dumazet, Dmitry Eremin-Solenikov, Sergey Lapin,
David S. Miller, open list:IEEE 802.15.4 SUB...,
open list:NETWORKING [GENERAL],
kernel-janitors
On Thu, Sep 01, 2011 at 06:04:25PM +0300, Dan Carpenter wrote:
> On Thu, Sep 01, 2011 at 01:26:02PM +0400, Alexander Smirnov wrote:
> > Hi Dan, Eric,
> >
> > thank you a lot for the finds, that were my faults.
> >
>
> So uh... You're going to send a patch to fix the things Eric
> mentioned, right?
>
Ah. You did already. I see that now. Sorry for the noise.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree()
[not found] ` <20110830134552.GH3705-z0WHZYlhLlzP0Z7Jsv878P8+0UxHXcjY@public.gmane.org>
@ 2011-09-15 19:42 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2011-09-15 19:42 UTC (permalink / raw)
To: error27-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
From: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Tue, 30 Aug 2011 16:45:52 +0300
> Use kfree_skb() to free sbk_buffs.
>
> Signed-off-by: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Applied.
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-15 19:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-30 13:45 [patch 1/3 -next] 6LoWPAN: use kfree_skb() instead of kfree() Dan Carpenter
2011-08-30 14:40 ` Eric Dumazet
2011-09-01 9:26 ` Alexander Smirnov
2011-09-01 15:04 ` Dan Carpenter
2011-09-01 15:06 ` Dan Carpenter
[not found] ` <20110830134552.GH3705-z0WHZYlhLlzP0Z7Jsv878P8+0UxHXcjY@public.gmane.org>
2011-09-15 19:42 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).