From: Nicolas Boichat <drink...@chromium.org>

commit 31013836a71e07751a6827f9d2ad41ef502ddaff upstream.

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-drink...@chromium.org
Fixes: 67a28de47faa8358 ("scripts/decode_stacktrace: only strip base path when 
a prefix of the path")
Signed-off-by: Nicolas Boichat <drink...@chromium.org>
Reviewed-by: Stephen Boyd <swb...@chromium.org>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
Signed-off-by: Linus Torvalds <torva...@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 scripts/decode_stacktrace.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/scripts/decode_stacktrace.sh
+++ b/scripts/decode_stacktrace.sh
@@ -85,7 +85,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'/' '}


Reply via email to