2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-28 20:44:00 +08:00

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>
This commit is contained in:
Steven Rostedt (VMware) 2018-02-22 22:32:51 -05:00
parent f06eec4d0f
commit a0ff08fd4e

View File

@ -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)