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: <1277280527.1875.782.camel@laptop>
Date:	Wed, 23 Jun 2010 10:08:47 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	paulmck@...ux.vnet.ibm.com
Cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, tglx@...utronix.de,
	daniel.blueman@...il.com, lizf@...fujitsu.com,
	miles.lane@...il.com, manfred@...orfullife.com
Subject: Re: [GIT PULL rcu/urgent] yet more lockdep-RCU splat fixes

On Tue, 2010-06-22 at 13:44 -0700, Paul E. McKenney wrote:

> I am probably missing something, but I see wake_affine() only called
> from select_task_rq_fair(), which is one of the possible values for
> ->select_task_rq().  This can be called from select_task_rq(), which
> claims that it can be called without holding rq->lock.  I do not see
> any rq->lock acquisition on the path from select_task_rq() to the
> call to wake_affine().
> 
You're right, although try_to_wake_up(), wake_up_new_task() and
sched_exec() all hold a rq->lock (not sufficient to cover both
task_group() callers though).

I posted a patch yesterday that makes try_to_wake_up() call
select_task_rq() without any rq->lock held (although its a scary patch
and needs more work).

> rcu: apply RCU protection to wake_affine()
> 
> The task_group() function returns a pointer that must be protected
> by either RCU, the ->alloc_lock, or the cgroup lock (see the
> rcu_dereference_check() in task_subsys_state(), which is invoked by
> task_group()).  The wake_affine() function currently does none of these,
> which means that a concurrent update would be within its rights to free
> the structure returned by task_group().  Because wake_affine() uses this
> structure only to compute load-balancing heuristics, there is no reason
> to acquire either of the two locks.
> 
> Therefore, this commit introduces an RCU read-side critical section that
> starts before the first call to task_group() and ends after the last use
> of the "tg" pointer returned from task_group().  Thanks to Li Zefan for
> pointing out the need to extend the RCU read-side critical section from
> that proposed by the original patch.
> 
> Signed-off-by: Daniel J Blueman <daniel.blueman@...il.com>
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

OK, fair enough, thanks!
--
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