]> git.hungrycats.org Git - linux/commit
riscv: uprobes: Restore thread.bad_cause
authorTiezhu Yang <yangtiezhu@loongson.cn>
Sun, 23 Apr 2023 01:42:26 +0000 (09:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jul 2023 17:39:48 +0000 (19:39 +0200)
commitf37fcc3078f256e08d51f36ffaeac9144a10aaa6
tree7d41071e5da0cc2fb2442fa52902cccece041ced
parentb0810f97e57a959d899a37152ff2c057d27dc219
riscv: uprobes: Restore thread.bad_cause

[ Upstream commit 58b1294dd1d65bb62f08dddbf418f954210c2057 ]

thread.bad_cause is saved in arch_uprobe_pre_xol(), it should be restored
in arch_uprobe_{post,abort}_xol() accordingly, otherwise the save operation
is meaningless, this change is similar with x86 and powerpc.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Fixes: 74784081aac8 ("riscv: Add uprobes supported")
Link: https://lore.kernel.org/r/1682214146-3756-1-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/kernel/probes/uprobes.c