]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
kdb: use correct pointer when 'btc' calls 'btt'
authorChristophe Leroy <christophe.leroy@c-s.fr>
Thu, 27 Sep 2018 17:17:49 +0000 (17:17 +0000)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:59:18 +0000 (19:59 -0600)
commit8bd350dd289db3fe81dc2dddd7775b46211dbc3d
tree15411be39fbac30ac4fae47f8a7103bf34dea6fa
parentea4db67d19662c16d262c6018d3572a5ae502d90
kdb: use correct pointer when 'btc' calls 'btt'

BugLink: https://bugs.launchpad.net/bugs/1836802
commit dded2e159208a9edc21dd5c5f583afa28d378d39 upstream.

On a powerpc 8xx, 'btc' fails as follows:

Entering kdb (current=0x(ptrval), pid 282) due to Keyboard Entry
kdb> btc
btc: cpu status: Currently on cpu 0
Available cpus: 0
kdb_getarea: Bad address 0x0

when booting the kernel with 'debug_boot_weak_hash', it fails as well

Entering kdb (current=0xba99ad80, pid 284) due to Keyboard Entry
kdb> btc
btc: cpu status: Currently on cpu 0
Available cpus: 0
kdb_getarea: Bad address 0xba99ad80

On other platforms, Oopses have been observed too, see
https://github.com/linuxppc/linux/issues/139

This is due to btc calling 'btt' with %p pointer as an argument.

This patch replaces %p by %px to get the real pointer value as
expected by 'btt'

Fixes: ad67b74d2469 ("printk: hash addresses printed with %p")
Cc: <stable@vger.kernel.org>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
kernel/debug/kdb/kdb_bt.c