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] [day] [month] [year] [list]
Message-ID: <20101014171504.GA14068@sgi.com>
Date:	Thu, 14 Oct 2010 12:15:04 -0500
From:	Robin Holt <holt@....com>
To:	Davide Libenzi <davidel@...ilserver.org>
Cc:	Robin Holt <holt@....com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [Patch] Convert max_user_watches to long.

On Sun, Oct 10, 2010 at 09:49:58PM -0700, Davide Libenzi wrote:
> On Sat, 9 Oct 2010, Robin Holt wrote:
> 
> > @@ -900,11 +902,12 @@ static int ep_insert(struct eventpoll *e
> >  {
> >  	int error, revents, pwake = 0;
> >  	unsigned long flags;
> > +	long user_watches;
> >  	struct epitem *epi;
> >  	struct ep_pqueue epq;
> >  
> > -	if (unlikely(atomic_read(&ep->user->epoll_watches) >=
> > -		     max_user_watches))
> > +	user_watches = atomic_long_read(&ep->user->epoll_watches);
> > +	if (user_watches >= max_user_watches)
> >  		return -ENOSPC;
> 
> Is there a particular reason for adding an extra, otherwise unused, 
> user_watches variable?

Keeps the line length and readability complaints down.  No other
reason.

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