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: <18974.32901.99290.162863@cargo.ozlabs.ibm.com>
Date:	Thu, 28 May 2009 22:16:05 +1000
From:	Paul Mackerras <paulus@...ba.org>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH v4] perf_counter: Fix race in attaching counters to
 tasks and exiting

Peter Zijlstra writes:

> The poor task will now have to wait for yet another RCU grace period,
> but yeah :-)

I moved the put_task_struct into put_ctx, inside the if, so the poor
task won't get impatient. :)

> Looks good, although lockdep will complain, the proper annotation would
> be spin_lock_nested_lock(&ctx->lock, &rq->lock), but since we don't have
> access to the rq here, we should change the second spin_lock, to:
> 
>   spin_lock_nested(&next_ctx->lock, SINGLE_DEPTH_NESTING);

Ah OK, thanks.

> You jump into an rcu_read_lock() section there.

Oops.  I'll fix that.  I also need to use spin_[un]lock_irq in there.
New version coming.  Thanks for the review.

Paul.
--
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