* [PATCH] net/ieee802154/6lowpan: Fix initialization for fragment offset
@ 2013-03-13 7:50 Wolf-Bastian Pöttner
2013-03-13 14:38 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Wolf-Bastian Pöttner @ 2013-03-13 7:50 UTC (permalink / raw)
To: Linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q
offset has to be initialized, otherwise the *first* fragment will
be discarded and reassembly cannot happen.
Reviewed-by: Alan Ott <alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
---
net/ieee802154/6lowpan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index ed3debe..2db7261 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -745,7 +745,7 @@ lowpan_process_data(struct sk_buff *skb)
{
struct lowpan_fragment *frame;
/* slen stores the rightmost 8 bits of the 11 bits length */
- u8 slen, offset;
+ u8 slen, offset = 0;
u16 len, tag;
bool found = false;
--
1.7.5.4
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] net/ieee802154/6lowpan: Fix initialization for fragment offset
2013-03-13 7:50 [PATCH] net/ieee802154/6lowpan: Fix initialization for fragment offset Wolf-Bastian Pöttner
@ 2013-03-13 14:38 ` David Miller
2013-03-13 14:40 ` Wolf-Bastian Pöttner
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2013-03-13 14:38 UTC (permalink / raw)
To: poettner; +Cc: Linux-zigbee-devel, alex.bluesman.smirnov, dbaryshkov, netdev
From: Wolf-Bastian Pöttner <poettner@ibr.cs.tu-bs.de>
Date: Wed, 13 Mar 2013 08:50:54 +0100
> offset has to be initialized, otherwise the *first* fragment will
> be discarded and reassembly cannot happen.
>
> Reviewed-by: Alan Ott <alan@signal11.us>
'offset' is never used unless lowpan_fetch_skb_u8(skb, &offset)
succeeds, in which case it will be initialized properly. Otherwise we
unlock and drop the SKB and make no references whatsoever to 'offset'.
I suspect you saw some compiler warning about 'offset' being
uninitialized, and are just blindly trying to shut this warning up.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net/ieee802154/6lowpan: Fix initialization for fragment offset
2013-03-13 14:38 ` David Miller
@ 2013-03-13 14:40 ` Wolf-Bastian Pöttner
[not found] ` <D859EF9A-19A9-4F74-B59D-28FADBCE338A-G+tS6SCNB47quOJu9mQKZg@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Wolf-Bastian Pöttner @ 2013-03-13 14:40 UTC (permalink / raw)
To: David Miller
Cc: Linux-zigbee-devel, alex.bluesman.smirnov, dbaryshkov, netdev
Hi!
Nope. The patch fixes a problem in code that is not in mainline yet. However, people on the linux-zigbee mailing list found it a good idea to commit this change to mainline to avoid the problem from arising.
I see, you disagree. Nevermind. ;)
Bastian
--
Wolf-Bastian Pöttner Institut für Betriebssysteme & Rechnerverbund
Tel.: +49-531-391-3265 Mühlenpfordtstrasse 23
Fax.: +49-531-391-5936 TU Braunschweig D-38106 Braunschweig
Am 13.03.2013 um 15:38 schrieb David Miller <davem@davemloft.net>:
> From: Wolf-Bastian Pöttner <poettner@ibr.cs.tu-bs.de>
> Date: Wed, 13 Mar 2013 08:50:54 +0100
>
>> offset has to be initialized, otherwise the *first* fragment will
>> be discarded and reassembly cannot happen.
>>
>> Reviewed-by: Alan Ott <alan@signal11.us>
>
> 'offset' is never used unless lowpan_fetch_skb_u8(skb, &offset)
> succeeds, in which case it will be initialized properly. Otherwise we
> unlock and drop the SKB and make no references whatsoever to 'offset'.
>
> I suspect you saw some compiler warning about 'offset' being
> uninitialized, and are just blindly trying to shut this warning up.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-13 15:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 7:50 [PATCH] net/ieee802154/6lowpan: Fix initialization for fragment offset Wolf-Bastian Pöttner
2013-03-13 14:38 ` David Miller
2013-03-13 14:40 ` Wolf-Bastian Pöttner
[not found] ` <D859EF9A-19A9-4F74-B59D-28FADBCE338A-G+tS6SCNB47quOJu9mQKZg@public.gmane.org>
2013-03-13 15:45 ` Alan Ott
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).