All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jason Baron <jbaron@akamai.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Shuo Chen <giantchen@gmail.com>,
	Jim Cromie <jim.cromie@gmail.com>,
	linux-kernel@vger.kernel.org, Shuo Chen <shuochen@google.com>
Subject: Re: [PATCH] dyndbg: fix parsing file query without a line-range suffix
Date: Fri, 30 Apr 2021 07:42:52 +0200	[thread overview]
Message-ID: <YIuY3GtRa1mO9/BG@kroah.com> (raw)
In-Reply-To: <a98d420c-500d-2790-0ee9-71f4690c24d7@akamai.com>

On Thu, Apr 29, 2021 at 05:08:28PM -0400, Jason Baron wrote:
> 
> 
> On 4/26/21 12:38 PM, Eric Dumazet wrote:
> > 
> > 
> > On 4/14/21 11:24 PM, Shuo Chen wrote:
> >> From: Shuo Chen <shuochen@google.com>
> >>
> >> Query like 'file tcp_input.c line 1234 +p' was broken by
> >> commit aaebe329bff0 ("dyndbg: accept 'file foo.c:func1' and 'file
> >> foo.c:10-100'") because a file name without a ':' now makes the loop in
> >> ddebug_parse_query() exits early before parsing the 'line 1234' part.
> >> As a result, all pr_debug() in tcp_input.c will be enabled, instead of only
> >> the one on line 1234.  Changing 'break' to 'continue' fixes this.
> >>
> >> Fixes: aaebe329bff0 ("dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100'")
> >> Signed-off-by: Shuo Chen <shuochen@google.com>
> >> ---
> >>  lib/dynamic_debug.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> >> index c70d6347afa2..921d0a654243 100644
> >> --- a/lib/dynamic_debug.c
> >> +++ b/lib/dynamic_debug.c
> >> @@ -396,7 +396,7 @@ static int ddebug_parse_query(char *words[], int nwords,
> >>  			/* tail :$info is function or line-range */
> >>  			fline = strchr(query->filename, ':');
> >>  			if (!fline)
> >> -				break;
> >> +				continue;
> >>  			*fline++ = '\0';
> >>  			if (isalpha(*fline) || *fline == '*' || *fline == '?') {
> >>  				/* take as function name */
> >>
> > 
> > SGTM, thanks !
> > 
> > Reviewed-by: Eric Dumazet <edumazet@google.com>
> > 
> 
> Hi Greg,
> 
> I acked this previously and is an important fix.
> Can you please pick it up if you haven't done so?

Will do, sorry for the delay.

greg k-h

      reply	other threads:[~2021-04-30  5:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 21:24 [PATCH] dyndbg: fix parsing file query without a line-range suffix Shuo Chen
2021-04-26 16:38 ` Eric Dumazet
2021-04-29 21:08   ` Jason Baron
2021-04-30  5:42     ` Greg Kroah-Hartman [this message]

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=YIuY3GtRa1mO9/BG@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=eric.dumazet@gmail.com \
    --cc=giantchen@gmail.com \
    --cc=jbaron@akamai.com \
    --cc=jim.cromie@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shuochen@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.