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]
Date:	Wed, 20 Mar 2013 09:05:40 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Tejun Heo <tj@...nel.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: linux-next: manual merge of the workqueues tree with Linus'
 tree

Hi Tejun,

On Tue, 19 Mar 2013 14:12:33 -0700 Tejun Heo <tj@...nel.org> wrote:
>
> On Tue, Mar 19, 2013 at 01:19:38PM +1100, Stephen Rothwell wrote:
> > @@@ -456,40 -462,30 +462,30 @@@ static int worker_pool_assign_id(struc
> >   {
> >   	int ret;
> >   
> > - 	mutex_lock(&worker_pool_idr_mutex);
> > - 	ret = idr_alloc(&worker_pool_idr, pool, 0, 0, GFP_KERNEL);
> > - 	if (ret >= 0)
> > - 		pool->id = ret;
> > - 	mutex_unlock(&worker_pool_idr_mutex);
> > + 	lockdep_assert_held(&wq_mutex);
> > + 
> > + 	do {
> >  -		if (!idr_pre_get(&worker_pool_idr, GFP_KERNEL))
> >  -			return -ENOMEM;
> >  -		ret = idr_get_new(&worker_pool_idr, pool, &pool->id);
> > ++		ret = idr_alloc(&worker_pool_idr, pool, 0, 0, GFP_KERNEL);
> > ++		if (ret >= 0)
> > ++			pool->id = ret;
> > + 	} while (ret == -EAGAIN);
> >   
> >  -	return ret;
> >  +	return ret < 0 ? ret : 0;
> 
> We don't need the loop anymore, so it should look like
> 
>   static int worker_pool_assign_id(struct worker_pool *pool)
>   {
> 	  int ret;
> 
> 	  lockdep_assert_held(&wq_mutex);
> 
> 	  ret = idr_alloc(&worker_pool_idr, pool, 0, 0, GFP_KERNEL);
> 	  if (ret >= 0) {
> 		  pool->id = ret;
> 		  return 0;
> 	  }
> 	  return ret;
>   }
> 
> Anyways, I pulled master into wq/for-next and resolved it there, so it
> shouldn't cause you any more trouble.

Ah, OK, thanks.   One small point, when you do a back merge like that,
you should always put an explanation in the commit message for the merge.

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ