This is a note to let you know that I've just added the patch titled dyndbg: fix old BUG_ON in >control parser to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: dyndbg-fix-old-bug_on-in-control-parser.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 00e7d3bea2ce7dac7bee1cf501fb071fd0ea8f6c Mon Sep 17 00:00:00 2001 From: Jim Cromie <jim.cromie@xxxxxxxxx> Date: Mon, 29 Apr 2024 13:31:11 -0600 Subject: dyndbg: fix old BUG_ON in >control parser From: Jim Cromie <jim.cromie@xxxxxxxxx> commit 00e7d3bea2ce7dac7bee1cf501fb071fd0ea8f6c 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@xxxxxxxxxx> Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx> Link: https://lore.kernel.org/r/20240429193145.66543-2-jim.cromie@xxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- lib/dynamic_debug.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -302,7 +302,11 @@ static int ddebug_tokenize(char *buf, ch } 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 */ Patches currently in stable-queue which might be from jim.cromie@xxxxxxxxx are queue-6.6/dyndbg-fix-old-bug_on-in-control-parser.patch