summaryrefslogtreecommitdiff
path: root/arch/arm/mach-gemini
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2024-03-19 13:39:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2024-03-19 11:23:30 -0700
commit24f5bb9f24ad80da6c6f83ba6124b5188c5384b2 (patch)
tree38dba42767b299419a7986cb2beac642edf075ca /arch/arm/mach-gemini
parentfbd88dd05780ef9b0026b09edcbc57a77742cfd6 (diff)
tracing: Just use strcmp() for testing __string() and __assign_str() match
As __assign_str() no longer uses its "src" parameter, there's a check to make sure nothing depends on it being different than what was passed to __string(). It originally just compared the pointer passed to __string() with the pointer passed into __assign_str() via the "src" parameter. But there's a couple of outliers that just pass in a quoted string constant, where comparing the pointers is UB to the compiler, as the compiler is free to create multiple copies of the same string constant. Instead, just use strcmp(). It may slow down the trace event, but this will eventually be removed. Also, fix the issue of passing NULL to strcmp() by adding a WARN_ON() to make sure that both "src" and the pointer saved in __string() are either both NULL or have content, and then checking if "src" is not NULL before performing the strcmp(). Link: https://lore.kernel.org/all/CAHk-=wjxX16kWd=uxG5wzqt=aXoYDf1BgWOKk+qVmAO0zh7sjA@mail.gmail.com/ Fixes: b1afefa62ca9 ("tracing: Use strcmp() in __assign_str() WARN_ON() check") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/mach-gemini')
0 files changed, 0 insertions, 0 deletions