[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110121175345.GB8796@redhat.com>
Date: Fri, 21 Jan 2011 18:53:45 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: mingo@...hat.com, hpa@...or.com, acme@...hat.com, paulus@...ba.org,
linux-kernel@...r.kernel.org, stern@...land.harvard.edu,
a.p.zijlstra@...llo.nl, fweisbec@...il.com, roland@...hat.com,
tglx@...utronix.de, prasad@...ux.vnet.ibm.com,
linux-tip-commits@...r.kernel.org,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH] perf: perf_event_exit_task_context:
s/rcu_dereference/rcu_dereference_raw/
On 01/21, Oleg Nesterov wrote:
>
> In theory, almost every user of task->child->perf_event_ctxp[]
> is wrong. find_get_context() can install the new context at any
> moment, we need read_barrier_depends().
And perhaps it makes sense to fix them all, although the problem
is only theoretical.
> dbe08d82ce3967ccdf459f7951d02589cf967300 "perf: Fix
> find_get_context() vs perf_event_exit_task() race" added
> rcu_dereference() into perf_event_exit_task_context() to make
> the precedent, but this makes __rcu_dereference_check() unhappy.
> Use rcu_dereference_raw() to shut up the warning.
But rcu_dereference_raw() looks a bit confusing, and it is not
very convenient to use read_barrier_depends() directly.
Paul, may be it makes sense to add the new trivial helper which
can be used instead?
Yes, this is only cosmetic issue, I know ;)
Oleg.
--
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