mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
tracing/synthetic: Fix trace_string() return value
Fix trace_string() by assigning the string length to the return variable which got lost in commitddeea494a1
("tracing/synthetic: Use union instead of casts") and caused trace_string() to always return 0. Link: https://lore.kernel.org/linux-trace-kernel/20240214220555.711598-1-thorsten.blum@toblux.com Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Fixes:ddeea494a1
("tracing/synthetic: Use union instead of casts") Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
parent
2394ac4145
commit
9b6326354c
@ -441,8 +441,9 @@ static unsigned int trace_string(struct synth_trace_event *entry,
|
||||
if (is_dynamic) {
|
||||
union trace_synth_field *data = &entry->fields[*n_u64];
|
||||
|
||||
len = fetch_store_strlen((unsigned long)str_val);
|
||||
data->as_dynamic.offset = struct_size(entry, fields, event->n_u64) + data_size;
|
||||
data->as_dynamic.len = fetch_store_strlen((unsigned long)str_val);
|
||||
data->as_dynamic.len = len;
|
||||
|
||||
ret = fetch_store_string((unsigned long)str_val, &entry->fields[*n_u64], entry);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user