diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-02-22 22:32:51 -0500 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-03-10 16:06:05 -0500 |
commit | a0ff08fd4e3f8b1cbc18950a8bf1f9067f7e700a (patch) | |
tree | 32065b34b85ed95c63ead2e7704f1d9667f55dc6 /kernel | |
parent | f06eec4d0f2c784788ed2e9aa12c9227c2341771 (diff) | |
download | linux-a0ff08fd4e3f8b1cbc18950a8bf1f9067f7e700a.tar.gz linux-a0ff08fd4e3f8b1cbc18950a8bf1f9067f7e700a.tar.bz2 linux-a0ff08fd4e3f8b1cbc18950a8bf1f9067f7e700a.zip |
tracing: Remove BUG_ON() from append_filter_string()
There's no reason to BUG if there's a bug in the filtering code. Simply do a
warning and return.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_events_filter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index a764aec3c9a1..819a13c3e13c 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c @@ -681,7 +681,8 @@ static int append_filter_string(struct event_filter *filter, int newlen; char *new_filter_string; - BUG_ON(!filter->filter_string); + if (WARN_ON(!filter->filter_string)) + return -EINVAL; newlen = strlen(filter->filter_string) + strlen(string) + 1; new_filter_string = kmalloc(newlen, GFP_KERNEL); if (!new_filter_string) |