All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>, Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] trace_events_filter: use rcu_assign_pointer() when setting ftrace_event_call->filter
Date: Mon, 28 Nov 2011 08:49:01 -0800	[thread overview]
Message-ID: <20111128164901.GE2346@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111123173313.GB29639@google.com>

On Wed, Nov 23, 2011 at 09:33:13AM -0800, Tejun Heo wrote:
> Hello, Steven.
> 
> On Wed, Nov 23, 2011 at 12:06:40PM -0500, Steven Rostedt wrote:
> > > So, synchronized_sched() being called after isn't relevant.  We want
> > > smp_wmb() between data structure initialization and assignment of the
> > > new pointer.
> > 
> > Ah, you're saying that we need to guarantee that the allocated filter is
> > seen before we update the call->filter to point to it. OK, fair enough,
> > this does look like a bug fix.
> > 
> > Is it big enough to be considered for stable?
> 
> It's unlikely to happen for x86 or arm and that probably is the
> biggest reason there hasn't already been a bug report.  It isn't very
> urgent but at the same time the change is almost trivial, so marking
> it for stable is a pretty safe bet.  I lean toward marking it for
> stable but the leaning isn't too strong. :)

I believe that marking it for stable makes sense, especially since
reasonably common compiler optimizations can rearrange the update side.
This can be especially painful for PREEMPT=y kernels, which could in
some cases preempt the task after the rearrangement, leaving readers
vulnerable to seeing uninitialized data for an extended time period.
Please note that this can happen even on arbitrarily strongly ordered
CPUs -- it is the compiler that is toying with us here.

							Thanx, Paul


  reply	other threads:[~2011-11-28 16:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23  1:46 [PATCH 1/2] trace_events_filter: use rcu_assign_pointer() when setting ftrace_event_call->filter Tejun Heo
2011-11-23  2:00 ` [PATCH 2/2] trace_event_filter: factorize filter creation Tejun Heo
2011-11-23 15:19   ` Steven Rostedt
2011-11-23 15:59     ` Tejun Heo
2011-11-28 20:49   ` Tejun Heo
2011-11-28 22:15     ` Steven Rostedt
2011-12-08 23:32       ` Tejun Heo
2011-12-09  0:15         ` Steven Rostedt
2011-12-09  0:46         ` Steven Rostedt
2011-12-09 18:55           ` Tejun Heo
2011-12-09 19:43   ` [PATCH 2/2 UPDATED] " Tejun Heo
2011-11-23 15:16 ` [PATCH 1/2] trace_events_filter: use rcu_assign_pointer() when setting ftrace_event_call->filter Steven Rostedt
2011-11-23 16:06   ` Tejun Heo
2011-11-23 16:12     ` Tejun Heo
2011-11-23 17:06     ` Steven Rostedt
2011-11-23 17:33       ` Tejun Heo
2011-11-28 16:49         ` Paul E. McKenney [this message]
2011-11-23 16:40 ` Eric Dumazet
2011-11-23 16:44   ` Tejun Heo
2011-11-23 16:49 ` [PATCH UPDATED " Tejun Heo
2011-12-05 17:34   ` [tip:perf/urgent] trace_events_filter: Use " tip-bot for Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111128164901.GE2346@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.