OpenCloudOS-Kernel/kernel/trace
Masami Hiramatsu (Google) 81507f633e tracing: probes: Fix to zero initialize a local variable
commit 0add699ad068d26e5b1da9ff28b15461fc4005df upstream.

Fix to initialize 'val' local variable with zero.
Dan reported that Smatch static code checker reports an error that a local
'val' variable needs to be initialized. Actually, the 'val' is expected to
be initialized by FETCH_OP_ARG in the same loop, but it is not obvious. So
initialize it with zero.

Link: https://lore.kernel.org/all/171092223833.237219.17304490075697026697.stgit@devnote2/

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/b010488e-68aa-407c-add0-3e059254aaa0@moroto.mountain/
Fixes: 25f00e40ce79 ("tracing/probes: Support $argN in return probe (kprobe and fprobe)")
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-01 01:58:34 +01:00
..
rv rv: Update rv_en(dis)able_monitor doc to match kernel-doc 2024-06-12 11:12:49 +02:00
Kconfig tracing: Build event generation tests only as modules 2024-06-27 13:49:05 +02:00
Makefile tracing/probes: Move finding func-proto API and getting func-param API to trace_btf 2023-08-23 09:39:45 +09:00
blktrace.c block: remove more NULL checks after bdev_get_queue() 2023-02-21 09:23:22 -07:00
bpf_trace.c bpf,perf: Fix perf_event_detach_bpf_prog error handling 2024-11-01 01:58:30 +01:00
bpf_trace.h
error_report-traces.c
fgraph.c tracing: arm64: Avoid missing-prototype warnings 2023-07-12 12:06:04 -04:00
fprobe.c fprobe: Fix to ensure the number of active retprobes is not zero 2023-10-17 10:22:42 +09:00
ftrace.c kprobe/ftrace: bail out if ftrace was killed 2024-06-27 13:49:03 +02:00
ftrace_internal.h tracing: arm64: Avoid missing-prototype warnings 2023-07-12 12:06:04 -04:00
kprobe_event_gen_test.c tracing: Fix wrong return in kprobe_event_gen_test.c 2023-03-19 12:20:48 -04:00
pid_list.c trace/pid_list: Change gfp flags in pid_list_fill_irq() 2024-08-03 08:54:17 +02:00
pid_list.h
power-traces.c
preemptirq_delay_test.c tracing: Add MODULE_DESCRIPTION() to preemptirq_delay_test 2024-06-27 13:49:14 +02:00
rethook.c rethook: Use __rcu pointer for rethook::handler 2023-12-13 18:45:19 +01:00
ring_buffer.c ring-buffer: Fix a race between readers and resize checks 2024-06-12 11:11:19 +02:00
ring_buffer_benchmark.c ring_buffer: Remove unused "event" parameter 2022-11-23 19:08:30 -05:00
rpm-traces.c
synth_event_gen_test.c tracing / synthetic: Disable events after testing in synth_event_gen_test_init() 2024-01-01 12:42:45 +00:00
trace.c tracing/probes: Support $argN in return probe (kprobe and fprobe) 2024-11-01 01:58:26 +01:00
trace.h tracing: Have format file honor EVENT_FILE_FL_FREED 2024-09-04 13:28:22 +02:00
trace_benchmark.c tracing: Add numeric delta time to the trace event benchmark 2022-09-26 13:01:09 -04:00
trace_benchmark.h tracing: Add numeric delta time to the trace event benchmark 2022-09-26 13:01:09 -04:00
trace_boot.c tracing/boot: Test strscpy() against less than zero for error 2023-07-05 10:30:49 -04:00
trace_branch.c
trace_btf.c tracing/probes: Fix to search structure fields correctly 2024-02-23 09:25:05 +01:00
trace_btf.h tracing/probes: Add a function to search a member of a struct/union 2023-08-23 09:40:16 +09:00
trace_clock.c
trace_dynevent.c tracing: Free buffers when a used dynamic event is removed 2022-11-23 19:07:12 -05:00
trace_dynevent.h
trace_entries.h tracing: Add back FORTIFY_SOURCE logic to kernel_stack event structure 2023-07-30 18:11:44 -04:00
trace_eprobe.c tracing/probes: Fix MAX_TRACE_ARGS limit handling 2024-11-01 01:58:28 +01:00
trace_event_perf.c tracing/perf: Use strndup_user instead of kzalloc/strncpy_from_user 2022-11-23 19:08:31 -05:00
trace_events.c tracing: Have format file honor EVENT_FILE_FL_FREED 2024-09-04 13:28:22 +02:00
trace_events_filter.c tracing: Have trace_event_file have ref counters 2023-11-08 11:56:21 +01:00
trace_events_filter_test.h
trace_events_hist.c tracing: Have format file honor EVENT_FILE_FL_FREED 2024-09-04 13:28:22 +02:00
trace_events_inject.c tracing: Have format file honor EVENT_FILE_FL_FREED 2024-09-04 13:28:22 +02:00
trace_events_synth.c tracing/synthetic: Fix trace_string() return value 2024-02-23 09:25:05 +01:00
trace_events_trigger.c tracing: Have format file honor EVENT_FILE_FL_FREED 2024-09-04 13:28:22 +02:00
trace_events_user.c tracing/user_events: Fix non-spaced field matching 2024-06-12 11:12:11 +02:00
trace_export.c tracing: Add back FORTIFY_SOURCE logic to kernel_stack event structure 2023-07-30 18:11:44 -04:00
trace_fprobe.c tracing/probes: Fix MAX_TRACE_ARGS limit handling 2024-11-01 01:58:28 +01:00
trace_functions.c
trace_functions_graph.c function_graph: Support recording and printing the return value of function 2023-06-20 18:38:37 -04:00
trace_hwlat.c tracing/hwlat: Fix a race during cpuhp processing 2024-10-10 11:57:59 +02:00
trace_irqsoff.c tracing: Fix memleak due to race between current_tracer and trace 2023-08-17 13:49:37 -04:00
trace_kdb.c
trace_kprobe.c tracing/probes: Fix MAX_TRACE_ARGS limit handling 2024-11-01 01:58:28 +01:00
trace_kprobe_selftest.c tracing: arm64: Avoid missing-prototype warnings 2023-07-12 12:06:04 -04:00
trace_kprobe_selftest.h
trace_mmiotrace.c
trace_nop.c
trace_osnoise.c tracing/timerlat: Fix duplicated kthread creation due to CPU online/offline 2024-10-10 11:57:59 +02:00
trace_output.c tracing: Remove precision vsnprintf() check from print event 2024-10-17 15:24:09 +02:00
trace_output.h tracing: Add "fields" option to show raw trace event fields 2023-03-29 06:52:08 -04:00
trace_preemptirq.c cpuidle: tracing, preempt: Squash _rcuidle tracing 2023-01-31 15:01:46 +01:00
trace_printk.c
trace_probe.c tracing: probes: Fix to zero initialize a local variable 2024-11-01 01:58:34 +01:00
trace_probe.h tracing/probes: Support $argN in return probe (kprobe and fprobe) 2024-11-01 01:58:26 +01:00
trace_probe_kernel.h tracing/probes: Fix to record 0-length data_loc in fetch_store_string*() if fails 2023-07-14 17:04:58 +09:00
trace_probe_tmpl.h tracing/probes: Support $argN in return probe (kprobe and fprobe) 2024-11-01 01:58:26 +01:00
trace_recursion_record.c
trace_sched_switch.c
trace_sched_wakeup.c tracing: Fix memleak due to race between current_tracer and trace 2023-08-17 13:49:37 -04:00
trace_selftest.c tracing: Have function_graph selftest call cond_resched() 2023-05-28 21:15:46 -04:00
trace_selftest_dynamic.c
trace_seq.c tracing: Fix kernel-doc warnings in trace_seq.c 2023-07-28 19:59:04 -04:00
trace_stack.c
trace_stat.c
trace_stat.h
trace_synth.h tracing: Allow synthetic events to pass around stacktraces 2023-01-25 10:31:24 -05:00
trace_syscalls.c tracing: bpf: use struct trace_entry in struct syscall_tp_t 2023-08-01 10:53:28 -07:00
trace_uprobe.c tracing/probes: Fix MAX_TRACE_ARGS limit handling 2024-11-01 01:58:28 +01:00
tracing_map.c tracing: Fix overflow in get_free_elt() 2024-08-14 13:58:58 +02:00
tracing_map.h tracing: Remove unused extern declaration tracing_map_set_field_descr() 2023-07-23 11:08:14 -04:00