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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Dec 2010 12:35:45 -0700
From:	"Tantilov, Emil S" <emil.s.tantilov@...el.com>
To:	Joe Perches <joe@...ches.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:	"davem@...emloft.net" <davem@...emloft.net>,
	"davem@...emleft.org" <davem@...emleft.org>,
	"Allan, Bruce W" <bruce.w.allan@...el.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"bphilips@...ell.com" <bphilips@...ell.com>
Subject: RE: [net-next-2.6 25/27] e1000e: static analysis tools complain of
 a possible null ptr p dereference

>-----Original Message-----
>From: netdev-owner@...r.kernel.org [mailto:netdev-owner@...r.kernel.org] On
>Behalf Of Joe Perches
>Sent: Friday, December 10, 2010 4:45 AM
>To: Kirsher, Jeffrey T
>Cc: davem@...emloft.net; davem@...emleft.org; Allan, Bruce W;
>netdev@...r.kernel.org; gospo@...hat.com; bphilips@...ell.com
>Subject: Re: [net-next-2.6 25/27] e1000e: static analysis tools complain of
>a possible null ptr p dereference
>
>On Fri, 2010-12-10 at 02:06 -0800, Jeff Kirsher wrote:
>> diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
>[]
>> +		default:
>> +			data[i] = 0;
>> +			continue;
>> +			break;
>
>Using
>
>	continue;
>	break;
>
>is odd and unhelpful.
>Just continue; is sufficient and clear.

It's odd and without consequence but not necessarily "unhelpful" as it can protect from bugs in case someone was to add another case statement. While unlikely, bugs in switch statements due to missing breaks are not unheard of.

Looking at the kernel source there is no consistency as far as break in the default: case is concerned.

Dave, unless this is infringing on some coding style rule, I would request that the patch be applied as is.

Thanks,
Emil

Powered by blists - more mailing lists