mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
dyndbg: fix old BUG_ON in >control parser
commit 00e7d3bea2
upstream.
Fix a BUG_ON from 2009. Even if it looks "unreachable" (I didn't
really look), lets make sure by removing it, doing pr_err and return
-EINVAL instead.
Cc: stable <stable@kernel.org>
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20240429193145.66543-2-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ca3cb17867
commit
a69e1bdd77
1 changed files with 5 additions and 1 deletions
|
@ -302,7 +302,11 @@ 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("parse err after word:%d=%s\n", nwords,
|
||||
nwords ? words[nwords - 1] : "<none>");
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
/* `buf' is start of word, `end' is one past its end */
|
||||
|
|
Loading…
Reference in a new issue