From: Ammar Faizi <[email protected]>
To: Steven Rostedt <[email protected]>, Ingo Molnar <[email protected]>
Cc: Ammar Faizi <[email protected]>,
GNU/Weeb Mailing List <[email protected]>,
Linux Kernel Mailing List <[email protected]>,
Linux Trace Devel Mailing List
<[email protected]>
Subject: [PATCH 0/2] Two tracing patches for trace_events_hist.c
Date: Mon, 18 Apr 2022 01:53:21 +0700 [thread overview]
Message-ID: <[email protected]> (raw)
Hi,
Two patches here.
## Patch 1
If `WARN_ON(!glob)` is ever triggered, we will still continue executing
the next lines. This will trigger the more serious problem, a NULL
pointer dereference bug. Just return -EINVAL if @glob is NULL.
## Patch 2
Change `if (strlen(glob))` to `if (glob[0])`. No need to traverse to
the end of string. If the first byte is not a NUL char, it's
guaranteed `if (strlen(glob))` is true.
Signed-off-by: Ammar Faizi <[email protected]>
---
Ammar Faizi (2):
tracing: Return -EINVAL if WARN_ON(!glob) triggered in event_hist_trigger_parse()
tracing: Change `if (strlen(glob))` to `if (glob[0])`
kernel/trace/trace_events_hist.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
base-commit: a1901b464e7e3e28956ae7423db2847dbbfb5be8
--
Ammar Faizi
next reply other threads:[~2022-04-17 18:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-17 18:53 Ammar Faizi [this message]
2022-04-17 18:53 ` [PATCH 1/2] tracing: Return -EINVAL if WARN_ON(!glob) triggered in event_hist_trigger_parse() Ammar Faizi
2022-04-17 18:53 ` [PATCH 2/2] tracing: Change `if (strlen(glob))` to `if (glob[0])` Ammar Faizi
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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