Skip to content

Commit 8cb22e0

Browse files
rddunlapgregkh
authored andcommitted
dynamic-debug-howto: fix optional/omitted ending line number to be LARGE instead of 0
[ Upstream commit 1f3c790 ] line-range is supposed to treat "1-" as "1-endoffile", so handle the special case by setting last_lineno to UINT_MAX. Fixes this error: dynamic_debug:ddebug_parse_query: last-line:0 < 1st-line:1 dynamic_debug:ddebug_exec_query: query parse failed Link: http://lkml.kernel.org/r/10a6a101-e2be-209f-1f41-54637824788e@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Jason Baron <jbaron@akamai.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 346008f commit 8cb22e0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎lib/dynamic_debug.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ static int ddebug_parse_query(char *words[], int nwords,
360360
if (parse_lineno(last, &query->last_lineno) < 0)
361361
return -EINVAL;
362362

363+
/* special case for last lineno not specified */
364+
if (query->last_lineno == 0)
365+
query->last_lineno = UINT_MAX;
366+
363367
if (query->last_lineno < query->first_lineno) {
364368
pr_err("last-line:%d < 1st-line:%d\n",
365369
query->last_lineno,

0 commit comments

Comments
 (0)