Skip to content

Commit

Permalink
scripts/decode_stacktrace: match basepath using shell prefix operator…
Browse files Browse the repository at this point in the history
…, not regex

[ Upstream commit 3101383 ]

The basepath may contain special characters, which would confuse the regex
matcher.  ${var#prefix} does the right thing.

Link: http://lkml.kernel.org/r/20190518055946.181563-1-drinkcat@chromium.org
Fixes: 67a28de ("scripts/decode_stacktrace: only strip base path when a prefix of the path")
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Nicolas Boichat authored and Greg Kroah-Hartman committed Sep 16, 2019
1 parent 6c59cb1 commit 90741c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/decode_stacktrace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ parse_symbol() {
fi

# Strip out the base of the path
code=${code//^$basepath/""}
code=${code#$basepath/}

# In the case of inlines, move everything to same line
code=${code//$'\n'/' '}
Expand Down

0 comments on commit 90741c3

Please sign in to comment.