lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <510AEE5C.6030303@wwwdotorg.org>
Date:	Thu, 31 Jan 2013 15:21:16 -0700
From:	Stephen Warren <swarren@...dotorg.org>
To:	Johannes Berg <johannes@...solutions.net>
CC:	"John W. Linville" <linville@...driver.com>,
	"David S. Miller" <davem@...emloft.net>,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Stephen Warren <swarren@...dia.com>
Subject: Re: [PATCH] nl80211: avoid "wdev_id may be used uninitialized"

On 01/31/2013 01:51 PM, Johannes Berg wrote:
> On Wed, 2013-01-30 at 09:49 -0700, Stephen Warren wrote:
>> On 01/30/2013 12:57 AM, Johannes Berg wrote:
>>> On Tue, 2013-01-29 at 17:11 -0700, Stephen Warren wrote:
>>>> From: Stephen Warren <swarren@...dia.com>
>>>>
>>>> Silence the following:
>>>> net/wireless/nl80211.c: In function '__cfg80211_wdev_from_attrs.clone.119':
>>>> net/wireless/nl80211.c:57:6: warning: 'wdev_id' may be used uninitialized in this function
>>>>
>>>> ... by always initializing wdev_id to zero. I assume that wiphy_idx and
>>>> ifidx are set to -1 for similar reasons, so this change simply propagates
>>>> the same workaround.
>>>>
>>>> In practice, this warning is false, since wdev_id is both set and used
>>>> under the condition if (have_wdev_id). However, at least my compiler
>>>> can't be coerced into realizing this; almost any code between the if
>>>> blocks that set and use the variable causes this warning.
>>>
>>> I don't see this warning? What compiler are you using?
>>
>> I'm using gcc-4.5.3 for ARM. I checked with gcc-4.6.3 and gcc-4.7.2 and
>> indeed I don't see the warning there.
> 
> Interesting. So should I keep it or remove it? I guess in this
> particular instance it doesn't matter all that much. In other cases I'd
> be more against changing it I guess.

It's your call. I guess since it's fixed going forward in gcc, you may
as well drop it though.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ