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: <1163787247.3097.14.camel@localhost.localdomain>
Date:	Fri, 17 Nov 2006 10:14:07 -0800
From:	Daniel Walker <dwalker@...sta.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Andrew Morton <akpm@...l.org>,
	Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>,
	Jens Axboe <axboe@...nel.dk>,
	Christoph Lameter <clameter@....com>,
	Pedro Roque <roque@...fc.ul.pt>,
	"David S. Miller" <davem@...emloft.net>,
	"Paul E. McKenney" <paulmck@...ibm.com>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Allow NULL pointers in percpu_free

On Fri, 2006-11-17 at 13:07 -0500, Alan Stern wrote:
> On Fri, 17 Nov 2006, Daniel Walker wrote:
> 
> > On Fri, 2006-11-17 at 12:36 -0500, Alan Stern wrote:
> > 
> > >  void percpu_free(void *__pdata)
> > >  {
> > > +	if (!__pdata)
> > > +		return;
> > 
> > Should be unlikely() right?
> 
> It certainly could be.  I tend not to put such annotations in my code, but 
> it wouldn't hurt.

It's actually a really good idea to add them .. I've noticed they tend
to make my kernels smaller, although I wouldn't expect that to always be
the case.. Another reason is that in -mm we can track how often this
condition is triggered with likely profiling. With kfree, for instance,
there were a number of callers that frequently called kfree(NULL), which
IMO isn't good.

Daniel

-
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