From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Tom Zanussi <zanussi@kernel.org>,
Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Subject: Re: [GIT PULL] tracing: Two event pid filtering bug fixes
Date: Sat, 27 Nov 2021 16:41:20 -0500 [thread overview]
Message-ID: <20211127164120.1eb79c1a@oasis.local.home> (raw)
In-Reply-To: <20211127132822.5d4d2a8b@gandalf.local.home>
On Sat, 27 Nov 2021 13:28:22 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> + struct trace_pid_list *no_pid_list;
> + struct trace_pid_list *pid_list;
> struct trace_event_file *file;
> + unsigned int first;
>
> 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 (!trace_pid_list_first(pid_list, &first) ||
> + !trace_pid_list_first(pid_list, &first))
> + file->flags |= EVENT_FILE_FL_PID_FILTER;
And of course since I only tested "trace only this pid" case, and not
the "trace everything but this pid" case, the above has a bug (which
the ktest bot just told me about), and my tests missed it.
That should have been:
if (!trace_pid_list_first(pid_list, &first) ||
!trace_pid_list_first(no_pid_list, &first))
I'll fix it, run it through my tests, and post another pull request :-/.
/me needs to add that case to his tests, even though it's extremely
rare (I never use it). Which is exactly why I should have a test for it!
-- Steve
next prev parent reply other threads:[~2021-11-27 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-27 18:28 Steven Rostedt
2021-11-27 20:12 ` Linus Torvalds
2021-11-27 20:42 ` Steven Rostedt
2021-11-27 20:15 ` pr-tracker-bot
2021-11-27 21:41 ` Steven Rostedt [this message]
2021-11-27 21:43 ` Steven Rostedt
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=20211127164120.1eb79c1a@oasis.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tz.stoyanov@gmail.com \
--cc=zanussi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®