Commit bcabd91c authored by Li Zefan's avatar Li Zefan Committed by Ingo Molnar
Browse files

tracing/filters: fix NULL pointer dereference

Try this, and you'll see NULL pointer dereference bug:

  # echo -n 'parent_comm ==' > sched/sched_process_fork/filter

Because we passed NULL ptr to simple_strtoull().
Signed-off-by: default avatarLi Zefan <>
Acked-by: default avatarTom Zanussi <>
Acked-by: default avatarFrederic Weisbecker <>
Cc: Steven Rostedt <>
LKML-Reference: <>
Signed-off-by: default avatarIngo Molnar <>
parent 8433a40e
......@@ -410,6 +410,11 @@ int filter_parse(char **pbuf, struct filter_pred *pred)
if (!val_str) {
pred->field_name = NULL;
return -EINVAL;
pred->field_name = kstrdup(pred->field_name, GFP_KERNEL);
if (!pred->field_name)
return -ENOMEM;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment