All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] tracing: Check pid filtering when creating events" failed to apply to 5.10-stable tree
Date: Mon, 29 Nov 2021 13:16:38 +0100	[thread overview]
Message-ID: <YaTEpnO0qlEstwZ3@kroah.com> (raw)
In-Reply-To: <20211128141016.107f29c7@oasis.local.home>

On Sun, Nov 28, 2021 at 02:10:15PM -0500, Steven Rostedt wrote:
> On Sun, 28 Nov 2021 13:48:05 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > +++ b/kernel/trace/trace_events.c
> > @@ -2677,12 +2677,23 @@ static struct trace_event_file *
> >  trace_create_new_event(struct trace_event_call *call,
> >  		       struct trace_array *tr)
> >  {
> > +	struct trace_pid_list *no_pid_list;
> > +	struct trace_pid_list *pid_list;
> >  	struct trace_event_file *file;
> > +	unsigned int first;
> >  
> 
> And even though this was the first fix, I somehow got a bit of the 5.16
> patch in here, as the "first" variable is only used for that.
> 
> Take two:
> 
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> Subject: [PATCH] tracing: Check pid filtering when creating events
> 
> When pid filtering is activated in an instance, all of the events trace
> files for that instance has the PID_FILTER flag set. This determines
> whether or not pid filtering needs to be done on the event, otherwise the
> event is executed as normal.
> 
> If pid filtering is enabled when an event is created (via a dynamic event
> or modules), its flag is not updated to reflect the current state, and the
> events are not filtered properly.
> 
> Cc: stable@vger.kernel.org
> Fixes: 3fdaf80f4a836 ("tracing: Implement event pid filtering")
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
>  kernel/trace/trace_events.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> Index: linux-test.git/kernel/trace/trace_events.c
> ===================================================================
> --- linux-test.git.orig/kernel/trace/trace_events.c
> +++ linux-test.git/kernel/trace/trace_events.c
> @@ -2462,12 +2462,22 @@ static struct trace_event_file *
>  trace_create_new_event(struct trace_event_call *call,
>  		       struct trace_array *tr)
>  {
> +	struct trace_pid_list *no_pid_list;
> +	struct trace_pid_list *pid_list;
>  	struct trace_event_file *file;
>  
>  	file = kmem_cache_alloc(file_cachep, GFP_TRACE);
>  	if (!file)
>  		return NULL;
>  
> +	pid_list = rcu_dereference_protected(tr->filtered_pids,
> +					     lockdep_is_held(&event_mutex));
> +	no_pid_list = rcu_dereference_protected(tr->filtered_no_pids,
> +					     lockdep_is_held(&event_mutex));
> +
> +	if (pid_list || no_pid_list)
> +		file->flags |= EVENT_FILE_FL_PID_FILTER;
> +
>  	file->event_call = call;
>  	file->tr = tr;
>  	atomic_set(&file->sm_ref, 0);

Oops, now I see this one, thanks...

greg "read the whole thread before reponding" k-h

  reply	other threads:[~2021-11-29 12:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28 11:44 FAILED: patch "[PATCH] tracing: Check pid filtering when creating events" failed to apply to 5.10-stable tree gregkh
2021-11-28 18:48 ` Steven Rostedt
2021-11-28 19:10   ` Steven Rostedt
2021-11-29 12:16     ` Greg KH [this message]
2021-11-29 12:16   ` Greg KH

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=YaTEpnO0qlEstwZ3@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.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.