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]
Message-ID: <20080607173436.GA17603@kroah.com>
Date:	Sat, 7 Jun 2008 10:34:36 -0700
From:	Greg KH <greg@...ah.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Andy Whitcroft <apw@...dowen.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-usb@...r.kernel.org
Subject: Re: update checkpatch.pl to version 0.19

On Fri, Jun 06, 2008 at 11:02:39PM -0700, Andrew Morton wrote:
> On Fri, 6 Jun 2008 16:30:37 -0700 Greg KH <greg@...ah.com> wrote:
> 
> > On Fri, Jun 06, 2008 at 07:22:25PM +0000, Linux Kernel Mailing List wrote:
> > > @@ -1920,23 +2004,16 @@ sub process {
> > >  				WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev);
> > >  			}
> > >  		}
> > > -# check for needless usb_free_urb() checks
> > > -		if ($prevline =~ /\bif\s*\(([^\)]*)\)/) {
> > > -			my $expr = $1;
> > > -			if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) {
> > > -				WARN("usb_free_urb(NULL) is safe this check is probabally not required\n" . $hereprev);
> > > -			}
> > > -		}
> > >  
> > 
> > I'm curious as to why this check was removed.  Any specific reason?  It
> > was valid from what I can tell.
> 
> Because of the spelling?
> 
> If so, let's be consistent:
> 
> --- a/scripts/checkpatch.pl~a
> +++ a/scripts/checkpatch.pl
> @@ -1997,14 +1997,6 @@ sub process {
>  				$herecurr);
>  		}
>  
> -# check for needless kfree() checks
> -		if ($prevline =~ /\bif\s*\(([^\)]*)\)/) {
> -			my $expr = $1;
> -			if ($line =~ /\bkfree\(\Q$expr\E\);/) {
> -				WARN("kfree(NULL) is safe this check is probabally not required\n" . $hereprev);
> -			}
> -		}
> -

That's the proverbial baby with the bathwater problem here, we can fix
spelling mistakes pretty easily :)

I'd prefer the original check to be put back, and the kfree(NULL) check
to remain as well, as it too is valid.

But I would like to find out first from Andy why this was removed.  Odds
are he wasn't keeping up with the changes upstream from his local copy,
which also might have caused other things to be removed over time :(

thanks,

greg k-h
--
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