tracing: Have the user copy of synthetic event address use correct context
[platform/kernel/linux-starfive.git] / kernel / trace / trace_events_synth.c
index 9897d0b..846e02c 100644 (file)
@@ -337,7 +337,7 @@ static void print_synth_event_num_val(struct trace_seq *s,
                break;
 
        default:
-               trace_seq_printf(s, print_fmt, name, val, space);
+               trace_seq_printf(s, print_fmt, name, val->as_u64, space);
                break;
        }
 }
@@ -452,7 +452,7 @@ static unsigned int trace_string(struct synth_trace_event *entry,
 
 #ifdef CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
                if ((unsigned long)str_val < TASK_SIZE)
-                       ret = strncpy_from_user_nofault(str_field, str_val, STR_VAR_LEN_MAX);
+                       ret = strncpy_from_user_nofault(str_field, (const void __user *)str_val, STR_VAR_LEN_MAX);
                else
 #endif
                        ret = strncpy_from_kernel_nofault(str_field, str_val, STR_VAR_LEN_MAX);