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: <1154725503.5932.251.camel@localhost.localdomain>
Date:	Fri, 04 Aug 2006 23:05:02 +0200
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Daniel Walker <dwalker@...sta.com>
Cc:	john stultz <johnstul@...ibm.com>, akpm@...l.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/10] -mm  clocksource: add some new API calls

On Fri, 2006-08-04 at 12:28 -0700, Daniel Walker wrote:
> > >  int clocksource_register(struct clocksource *c)
> > >  {
> > >  	int ret = 0;
> > >  	unsigned long flags;
> > >  
> > > +	if (unlikely(!c))
> > > +		return -EINVAL;
> > > +
> > 
> > I'm not sure I understand the need for this. Is it really likely someone
> > would pass NULL to clocksource_register()?
> 
> Not likely, I was just covering all possibilities.. It might be better
> as a BUG_ON() actually.

BUG_ON is the only thing, which can be correct here. Registering a NULL
clocksource simply is a bug, but even the BUG_ON is overkill here. 

	tglx


-
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