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>] [day] [month] [year] [list]
Date:	Thu, 28 Jul 2011 22:35:40 +0200 (CEST)
From:	Jesper Juhl <jj@...osbits.net>
To:	linux-kernel@...r.kernel.org
cc:	netdev@...r.kernel.org, Alexey Dobriyan <adobriyan@...il.com>,
	Ben Hutchings <ben@...adent.org.uk>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Akinobu Mita <akinobu.mita@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Ion Badulescu <ionut@...ula.org>, becker@...ld.com
Subject: Dead code in Starfire driver (set_vlan_mode())

In drivers/net/starfire.c::set_vlan_mode() there is this code:

...
	if (vlan_count == 32) {
		ret |= PerfectFilterVlan;
		while (vlan_count < 32) {
...

We've just tested 'vlan_count' as being equal to '32', so it's a bit silly 
to follow that up with a loop that's conditioned on the variable being 
less than that - it will never execute.

Now I don't know this code at all, so I have no idea what the proper fix 
is (just remove the loop? change the loop condition? something else?), but 
I do know that the current code makes little sense ;-)

Just for your information.

-- 
Jesper Juhl <jj@...osbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
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