Messages in this thread | | | Date | Thu, 28 May 2009 22:16:05 +1000 | From | Paul Mackerras <> | 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.
| |