[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPshTCj38XqrAMTKnGhw1bdWWrhHbzXpT8FNtDwd6_kJgLoeDg@mail.gmail.com>
Date: Mon, 16 Dec 2013 00:20:22 +0800
From: Jerry Chu <hkchu@...gle.com>
To: David Miller <davem@...emloft.net>
Cc: hannes@...essinduktion.org, Eric Dumazet <edumazet@...gle.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Or Gerlitz <ogerlitz@...lanox.com>,
Ben Hutchings <bhutchings@...arflare.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] ipv6: fix compiler warning in ipv6_exthdrs_len
On Sat, Dec 14, 2013 at 3:02 PM, David Miller <davem@...emloft.net> wrote:
> From: Hannes Frederic Sowa <hannes@...essinduktion.org>
> Date: Sat, 14 Dec 2013 07:29:29 +0100
>
>> Commit 299603e8370a93dd5d8e8d800f0dff1ce2c53d36 ("net-gro: Prepare GRO
>> stack for the upcoming tunneling support") used an uninitialized variable
>> which leads to the following compiler warning:
>>
>> net/ipv6/ip6_offload.c: In function ‘ipv6_gro_complete’:
>> net/ipv6/ip6_offload.c:178:24: warning: ‘optlen’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>> opth = (void *)opth + optlen;
>> ^
>> net/ipv6/ip6_offload.c:164:22: note: ‘optlen’ was declared here
>> int len = 0, proto, optlen;
>> ^
>> Fix it up.
>>
>> Cc: Jerry Chu <hkchu@...gle.com>
>> Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
>
> Applied.
Please back out the above "fix" - it actually breaks the original code because
the fix will cause exthdrs_len to be one optlen short.
There was no bug in the original code, just the compiler warning (and I do not
get any warning, although I admit I did not run with the -W flag).
In any case I will submit a revision shortly that will silent any
warning if exists.
Jerry
--
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