aboutsummaryrefslogtreecommitdiff
path: root/kernel/jump_label.c
diff options
context:
space:
mode:
authorSteven Rostedt (Google)2022-03-23 10:32:51 -0400
committerSteven Rostedt (Google)2022-03-23 10:51:58 -0400
commiteca344a7362e0f34f179298fd8366bcd556eede1 (patch)
tree2df9b0079f1248d7e010f4b99acbe5ac39a4c96b /kernel/jump_label.c
parent78cbc6513217b00be6a9904415ef7ff3619eb035 (diff)
tracing: Have trace event string test handle zero length strings
If a trace event has in its TP_printk(): "%*.s", len, len ? __get_str(string) : NULL It is perfectly valid if len is zero and passing in the NULL. Unfortunately, the runtime string check at time of reading the trace sees the NULL and flags it as a bad string and produces a WARN_ON(). Handle this case by passing into the test function if the format has an asterisk (star) and if so, if the length is zero, then mark it as safe. Link: https://lore.kernel.org/all/YjsWzuw5FbWPrdqq@bfoster/ Cc: stable@vger.kernel.org Reported-by: Brian Foster <bfoster@redhat.com> Tested-by: Brian Foster <bfoster@redhat.com> Fixes: 9a6944fee68e2 ("tracing: Add a verifier to check string pointers for trace events") Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/jump_label.c')
0 files changed, 0 insertions, 0 deletions