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]
Date:	Sun, 9 Jan 2011 18:11:42 -0500
From:	Tejun Heo <tj@...nel.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Chris Mason <chris.mason@...cle.com>,
	Frank Rowand <frank.rowand@...sony.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mike Galbraith <efault@....de>, Paul Turner <pjt@...gle.com>,
	Jens Axboe <axboe@...nel.dk>,
	Yong Zhang <yong.zhang0@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 12/17] sched: Also serialize ttwu_local() with
 p->pi_lock

Hello,

On Mon, Jan 03, 2011 at 06:32:54PM +0100, Oleg Nesterov wrote:
> > @@ -2523,16 +2523,21 @@ static void try_to_wake_up_local(struct
> >
> >  	BUG_ON(rq != this_rq());
> >  	BUG_ON(p == current);
> > -	lockdep_assert_held(&rq->lock);
> > +
> > +	raw_spin_unlock(&rq->lock);
> > +	raw_spin_lock(&p->pi_lock);
> > +	raw_spin_lock(&rq->lock);
> 
> I _think_ this is safe, this worker can't change cpu afaics. But
> probably Tejun can take a look, just in case.

Yeah, preemption is disabled so it should be safe.  Only bound workers
can be woken up by ttwu_local.  They get migrated to another CPU only
during CPU offlining.  Both CPU offlining and task exit wouldn't
happen while preemption is disabled so it should be safe.

Thanks.

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