diff options
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 64ec4d278ffb..054bc1802bcd 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -503,6 +503,7 @@ event_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, | |||
503 | 503 | ||
504 | if (copy_from_user(&buf, ubuf, cnt)) | 504 | if (copy_from_user(&buf, ubuf, cnt)) |
505 | return -EFAULT; | 505 | return -EFAULT; |
506 | buf[cnt] = '\0'; | ||
506 | 507 | ||
507 | pred = kzalloc(sizeof(*pred), GFP_KERNEL); | 508 | pred = kzalloc(sizeof(*pred), GFP_KERNEL); |
508 | if (!pred) | 509 | if (!pred) |
@@ -569,6 +570,7 @@ subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, | |||
569 | 570 | ||
570 | if (copy_from_user(&buf, ubuf, cnt)) | 571 | if (copy_from_user(&buf, ubuf, cnt)) |
571 | return -EFAULT; | 572 | return -EFAULT; |
573 | buf[cnt] = '\0'; | ||
572 | 574 | ||
573 | pred = kzalloc(sizeof(*pred), GFP_KERNEL); | 575 | pred = kzalloc(sizeof(*pred), GFP_KERNEL); |
574 | if (!pred) | 576 | if (!pred) |