[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88110ffe6b08a2b403f30f4ea7463d5dad50b80b.camel@perches.com>
Date: Mon, 21 Sep 2020 12:29:29 -0700
From: Joe Perches <joe@...ches.com>
To: Jim Cromie <jim.cromie@...il.com>, jbaron@...mai.com,
gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Cc: Petr Mladek <pmladek@...e.com>
Subject: Re: [PATCH 1/2] dyndbg: dont panic over bad input
On Mon, 2020-09-21 at 13:04 -0600, Jim Cromie wrote:
> This BUG_ON, from 2009, caught the impossible case of a word-char both
> starting and ending a string (loosely speaking). A bad (reverted)
> patch finally hit this case, but even "impossibly bad input" is no
> reason to panic the kernel. Instead pr_err and return -EINVAL.
[]
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
[]
> @@ -259,7 +259,10 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords)
> } else {
> for (end = buf; *end && !isspace(*end); end++)
> ;
> - BUG_ON(end == buf);
> + if (end == buf) {
> + pr_err("expected non-empty bareword");
missing newline
This message is also unintelligible.
What is a non-empty bareword?
Powered by blists - more mailing lists