Skip to content

Commit 2c2b3d9

Browse files
committed
Merge tag 'trace-v6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing fixes from Steven Rostedt: "Two minor tracing fixes: - Add "const" to "char *" in event structure field that gets assigned literals. - Check size of input passed into the tracing cpumask file. If a too large of an input gets passed into the cpumask file, it could trigger a warning in the bitmask parsing code" * tag 'trace-v6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Prevent bad count for tracing_cpumask_write tracing: Constify string literal data member in struct trace_event_call
2 parents d6ef8b4 + 98feccb commit 2c2b3d9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

include/linux/trace_events.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ struct trace_event_call {
364364
struct list_head list;
365365
struct trace_event_class *class;
366366
union {
367-
char *name;
367+
const char *name;
368368
/* Set TRACE_EVENT_FL_TRACEPOINT flag when using "tp" */
369369
struct tracepoint *tp;
370370
};

kernel/trace/trace.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5087,6 +5087,9 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf,
50875087
cpumask_var_t tracing_cpumask_new;
50885088
int err;
50895089

5090+
if (count == 0 || count > KMALLOC_MAX_SIZE)
5091+
return -EINVAL;
5092+
50905093
if (!zalloc_cpumask_var(&tracing_cpumask_new, GFP_KERNEL))
50915094
return -ENOMEM;
50925095

0 commit comments

Comments
 (0)