Commit 8d23872c authored by Nicolas Boichat's avatar Nicolas Boichat Committed by Greg Kroah-Hartman

scripts/decode_stacktrace: match basepath using shell prefix operator, not regex

[ Upstream commit 31013836 ]

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: 67a28de4 ("scripts/decode_stacktrace: only strip base path when a prefix of the path")
Signed-off-by: default avatarNicolas Boichat <drinkcat@chromium.org>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6c550a5d
...@@ -78,7 +78,7 @@ parse_symbol() { ...@@ -78,7 +78,7 @@ parse_symbol() {
fi fi
# Strip out the base of the path # Strip out the base of the path
code=${code//^$basepath/""} code=${code#$basepath/}
# In the case of inlines, move everything to same line # In the case of inlines, move everything to same line
code=${code//$'\n'/' '} code=${code//$'\n'/' '}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment