summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-01-19 11:44:34 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-19 11:44:34 +0200
commite9f5cbc0c851c1cf98e4ecc5d72b5563d3fc5605 (patch)
treec5e036b026d76379181b405dd110acb49dc36761 /scripts
parentf1b744f65e2f9682347c5faf6377e61e2ab19a67 (diff)
parent35140d399db2b67153fc53b51a97ddb8ba3b5956 (diff)
downloadlinux-e9f5cbc0c851c1cf98e4ecc5d72b5563d3fc5605.tar.gz
linux-e9f5cbc0c851c1cf98e4ecc5d72b5563d3fc5605.tar.bz2
linux-e9f5cbc0c851c1cf98e4ecc5d72b5563d3fc5605.zip
Merge tag 'trace-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fix from Steven Rostedt: "tracing/scripts: Possible uninitialized variable The 0day bot discovered a possible uninitialized path in the scripts that sort the mcount sections at build time. Just needed to initialize that variable" * tag 'trace-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: script/sorttable: Fix some initialization problems
Diffstat (limited to 'scripts')
-rw-r--r--scripts/sorttable.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/sorttable.h b/scripts/sorttable.h
index 1e8b77928fa4..deb7c1d3e979 100644
--- a/scripts/sorttable.h
+++ b/scripts/sorttable.h
@@ -199,6 +199,8 @@ static int compare_extable(const void *a, const void *b)
return 0;
}
#ifdef MCOUNT_SORT_ENABLED
+pthread_t mcount_sort_thread;
+
struct elf_mcount_loc {
Elf_Ehdr *ehdr;
Elf_Shdr *init_data_sec;
@@ -282,10 +284,9 @@ static int do_sort(Elf_Ehdr *ehdr,
unsigned int shnum;
unsigned int shstrndx;
#ifdef MCOUNT_SORT_ENABLED
- struct elf_mcount_loc mstruct;
+ struct elf_mcount_loc mstruct = {0};
uint_t _start_mcount_loc = 0;
uint_t _stop_mcount_loc = 0;
- pthread_t mcount_sort_thread;
#endif
#if defined(SORTTABLE_64) && defined(UNWINDER_ORC_ENABLED)
unsigned int orc_ip_size = 0;