]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scripts/decode_stacktrace.sh: support old bash version
authorSchspa Shi <schspa@gmail.com>
Fri, 29 Apr 2022 21:37:57 +0000 (14:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 07:42:31 +0000 (08:42 +0100)
commita3d71b6ae935b0343f191be610cd1e5518bfbf99
treee4540e92f536bb83dae349caab33bbddb7b36ce6
parentae992f14b1176293c0998cc241c721b694aa4b67
scripts/decode_stacktrace.sh: support old bash version

[ Upstream commit 3af8acf6aff2a98731522b52927429760f0b8006 ]

Old bash version don't support associative array variables.  Avoid to use
associative array variables to avoid error.

Without this, old bash version will report error as fellowing
[   15.954042] Kernel panic - not syncing: sysrq triggered crash
[   15.955252] CPU: 1 PID: 167 Comm: sh Not tainted 5.18.0-rc1-00208-gb7d075db2fd5 #4
[   15.956472] Hardware name: Hobot J5 Virtual development board (DT)
[   15.957856] Call trace:
./scripts/decode_stacktrace.sh: line 128: ,dump_backtrace: syntax error: operand expected (error token is ",dump_backtrace")

Link: https://lkml.kernel.org/r/20220409180331.24047-1-schspa@gmail.com
Signed-off-by: Schspa Shi <schspa@gmail.com>
Cc: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: efbd63983533 ("scripts/decode_stacktrace.sh: optionally use LLVM utilities")
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/decode_stacktrace.sh