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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081025183905.GC10932@joi>
Date:	Sat, 25 Oct 2008 20:39:09 +0200
From:	Marcin Slusarz <marcin.slusarz@...il.com>
To:	"Carlos R. Mafra" <crmafra2@...il.com>
Cc:	Arjan van de Ven <arjan@...radead.org>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [2.6.28-rc1 regression] wmifinfo dockapp takes 100% of cpu
	(bisected)

one more thing:

On Sat, Oct 25, 2008 at 08:29:29PM +0200, Carlos R. Mafra wrote:
> > > > diff --git a/fs/compat.c b/fs/compat.c
> > > > index fe3c9bf..95ceee6 100644
> > > > --- a/fs/compat.c
> > > > +++ b/fs/compat.c
> > > > @@ -1680,9 +1680,16 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
> > > >  	int ret;
> > > >  
> > > >  	if (tvp) {
> > > > +		int i;

"i" should be initialized to 0

> > > >  		if (copy_from_user(&tv, tvp, sizeof(tv)))
> > > >  			return -EFAULT;
> > > >  
> > > > +		while (tv.tv_usec > USEC_PER_SEC && i < 1000) {
> >                                   ^ 
> > should be >=
> > 
> > > > +			i++;
> > > > +			tv.tv_sec ++;
> > > > +			tv.tv_usec -= USEC_PER_SEC;
> > > > +		}
> > > > +
> > > >  		to = &end_time;
> > > >  		if (poll_select_set_timeout(to, tv.tv_sec,
> > > >  					    tv.tv_usec * NSEC_PER_USEC))
> > > > diff --git a/fs/select.c b/fs/select.c
> > > > index 448e440..e4e7cdb 100644
> > > > --- a/fs/select.c
> > > > +++ b/fs/select.c
> > > > @@ -515,9 +515,16 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
> > > >  	int ret;
> > > >  
> > > >  	if (tvp) {
> > > > +		int i = 0;
> > > >  		if (copy_from_user(&tv, tvp, sizeof(tv)))
> > > >  			return -EFAULT;
> > > >  
> > > > +		while (tv.tv_usec > USEC_PER_SEC && i < 1000) {
> > 
> > and here too
> 
> 
> Yes, changing to >= solves the problem here.
> 
> Thanks Arjan and Marcin!
> 
> 
> > > > +			i++;
> > > > +			tv.tv_sec ++;
> > > > +			tv.tv_usec -= USEC_PER_SEC;
> > > > +		}
> > > > +
> > > >  		to = &end_time;
> > > >  		if (poll_select_set_timeout(to, tv.tv_sec,
> > > >  					    tv.tv_usec * NSEC_PER_USEC))
> > > > 
> > > > -- 
--
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