提交 8d23872c 编写于 作者: N Nicolas Boichat 提交者: Greg Kroah-Hartman

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

[ Upstream commit 31013836a71e07751a6827f9d2ad41ef502ddaff ]

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: 67a28de47faa8358 ("scripts/decode_stacktrace: only strip base path when a prefix of the path")
Signed-off-by: NNicolas Boichat <drinkcat@chromium.org>
Reviewed-by: NStephen Boyd <swboyd@chromium.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 6c550a5d
......@@ -78,7 +78,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'/' '}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册