Three tracing fixes:
- Make local osnoise_instances static - Copy just actual size of histogram strings - Properly check missing operands in histogram expressions -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCYY++DxQccm9zdGVkdEBn b29kbWlzLm9yZwAKCRAp5XQQmuv6qn93AQD9sBFtm7D/90P8KMp/yl75OTd1InGm uZPOioR/itFXBwD6A4Y4xbpN0aWByM4P31pqFjZRxY0wmInHw3fkd8EjmQM= =LgAs -----END PGP SIGNATURE----- Merge tag 'trace-v5.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Three tracing fixes: - Make local osnoise_instances static - Copy just actual size of histogram strings - Properly check missing operands in histogram expressions" * tag 'trace-v5.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/histogram: Fix check for missing operands in an expression tracing/histogram: Do not copy the fixed-size char array field over the field size tracing/osnoise: Make osnoise_instances static
This commit is contained in:
commit
7c3737c706
@ -1953,9 +1953,10 @@ static struct hist_field *create_hist_field(struct hist_trigger_data *hist_data,
|
||||
if (!hist_field->type)
|
||||
goto free;
|
||||
|
||||
if (field->filter_type == FILTER_STATIC_STRING)
|
||||
if (field->filter_type == FILTER_STATIC_STRING) {
|
||||
hist_field->fn = hist_field_string;
|
||||
else if (field->filter_type == FILTER_DYN_STRING)
|
||||
hist_field->size = field->size;
|
||||
} else if (field->filter_type == FILTER_DYN_STRING)
|
||||
hist_field->fn = hist_field_dynstring;
|
||||
else
|
||||
hist_field->fn = hist_field_pstring;
|
||||
@ -2580,7 +2581,8 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data,
|
||||
operand1_str = str;
|
||||
str = sep+1;
|
||||
|
||||
if (!operand1_str || !str)
|
||||
/* Binary operator requires both operands */
|
||||
if (*operand1_str == '\0' || *str == '\0')
|
||||
goto free;
|
||||
|
||||
operand_flags = 0;
|
||||
@ -3025,7 +3027,7 @@ static inline void __update_field_vars(struct tracing_map_elt *elt,
|
||||
char *str = elt_data->field_var_str[j++];
|
||||
char *val_str = (char *)(uintptr_t)var_val;
|
||||
|
||||
strscpy(str, val_str, STR_VAR_LEN_MAX);
|
||||
strscpy(str, val_str, val->size);
|
||||
var_val = (u64)(uintptr_t)str;
|
||||
}
|
||||
tracing_map_set_var(elt, var_idx, var_val);
|
||||
@ -4920,7 +4922,7 @@ static void hist_trigger_elt_update(struct hist_trigger_data *hist_data,
|
||||
|
||||
str = elt_data->field_var_str[idx];
|
||||
val_str = (char *)(uintptr_t)hist_val;
|
||||
strscpy(str, val_str, STR_VAR_LEN_MAX);
|
||||
strscpy(str, val_str, hist_field->size);
|
||||
|
||||
hist_val = (u64)(uintptr_t)str;
|
||||
}
|
||||
|
@ -55,7 +55,8 @@ struct osnoise_instance {
|
||||
struct list_head list;
|
||||
struct trace_array *tr;
|
||||
};
|
||||
struct list_head osnoise_instances;
|
||||
|
||||
static struct list_head osnoise_instances;
|
||||
|
||||
static bool osnoise_has_registered_instances(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user