Commit e0d183a8 authored by Ananth N Mavinakayanahalli's avatar Ananth N Mavinakayanahalli Committed by Zheng Zengkai
Browse files

powerpc/sstep: Fix incorrect return from analyze_instr()



stable inclusion
from stable-5.10.21
commit 686fa5a0c647721f24721a53e9d78972eb673e02
bugzilla: 50609

--------------------------------

commit 718aae91 upstream.

We currently just percolate the return value from analyze_instr()
to the caller of emulate_step(), especially if it is a -1.

For one particular case (opcode = 4) for instructions that aren't
currently emulated, we are returning 'should not be single-stepped'
while we should have returned 0 which says 'did not emulate, may
have to single-step'.

Fixes: 930d6288 ("powerpc: sstep: Add support for maddhd, maddhdu, maddld instructions")
Signed-off-by: default avatarAnanth N Mavinakayanahalli <ananth@linux.ibm.com>
Suggested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Tested-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: default avatarSandipan Das <sandipan@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/161157999039.64773.14950289716779364766.stgit@thinktux.local


Signed-off-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent eb775f81
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment