Skip to content

Commit e9f5cbc

Browse files
committed
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
2 parents f1b744f + 35140d3 commit e9f5cbc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/sorttable.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ static int compare_extable(const void *a, const void *b)
199199
return 0;
200200
}
201201
#ifdef MCOUNT_SORT_ENABLED
202+
pthread_t mcount_sort_thread;
203+
202204
struct elf_mcount_loc {
203205
Elf_Ehdr *ehdr;
204206
Elf_Shdr *init_data_sec;
@@ -282,10 +284,9 @@ static int do_sort(Elf_Ehdr *ehdr,
282284
unsigned int shnum;
283285
unsigned int shstrndx;
284286
#ifdef MCOUNT_SORT_ENABLED
285-
struct elf_mcount_loc mstruct;
287+
struct elf_mcount_loc mstruct = {0};
286288
uint_t _start_mcount_loc = 0;
287289
uint_t _stop_mcount_loc = 0;
288-
pthread_t mcount_sort_thread;
289290
#endif
290291
#if defined(SORTTABLE_64) && defined(UNWINDER_ORC_ENABLED)
291292
unsigned int orc_ip_size = 0;

0 commit comments

Comments
 (0)