From: Greg KH <gregkh@linuxfoundation.org>
To: Jim Cromie <jim.cromie@gmail.com>
Cc: jbaron@akamai.com, linux-kernel@vger.kernel.org,
Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH 1/2] dyndbg: dont panic over bad input
Date: Sun, 27 Sep 2020 14:29:09 +0200 [thread overview]
Message-ID: <20200927122909.GA186979@kroah.com> (raw)
In-Reply-To: <20200921190433.1149521-2-jim.cromie@gmail.com>
On Mon, Sep 21, 2020 at 01:04:32PM -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.
>
> Reported-by: Petr Mladek <pmladek@suse.com>
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> ---
> lib/dynamic_debug.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index 2d4dfd44b0fa5..90ddf07ce34fe 100644
> --- 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");
Need a "\n" here, right?
thanks,
greg k-h
next prev parent reply other threads:[~2020-09-27 12:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 19:04 [PATCH 0/2] dyndbg: 2 fixes/cleanups for 5.9 Jim Cromie
2020-09-21 19:04 ` [PATCH 1/2] dyndbg: dont panic over bad input Jim Cromie
2020-09-21 19:29 ` Joe Perches
2020-09-22 3:57 ` jim.cromie
2020-09-22 8:08 ` Petr Mladek
2020-09-22 14:23 ` jim.cromie
2020-09-27 12:29 ` Greg KH [this message]
2020-09-21 19:04 ` [PATCH 2/2] dyndbg: use keyword, arg varnames for query term pairs Jim Cromie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200927122909.GA186979@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jbaron@akamai.com \
--cc=jim.cromie@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome