m68k: Handle arrivals of multiple signals correctly
stable inclusion from stable-5.10.74 commit 194e8a4f0acd8a9d2915fd5fb8249e2797393078 bugzilla: 182986 https://gitee.com/openeuler/kernel/issues/I4I3MG Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=194e8a4f0acd8a9d2915fd5fb8249e2797393078 -------------------------------- [ Upstream commit 4bb0bd81 ] When we have several pending signals, have entered with the kernel with large exception frame *and* have already built at least one sigframe, regs->stkadj is going to be non-zero and regs->format/sr/pc are going to be junk - the real values are in shifted exception stack frame we'd built when putting together the first sigframe. If that happens, subsequent sigframes are going to be garbage. Not hard to fix - just need to find the "adjusted" frame first and look for format/vector/sr/pc in it. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Tested-by: NMichael Schmitz <schmitzmic@gmail.com> Reviewed-by: NMichael Schmitz <schmitzmic@gmail.com> Tested-by: NFinn Thain <fthain@linux-m68k.org> Link: https://lore.kernel.org/r/YP2dBIAPTaVvHiZ6@zeniv-ca.linux.org.ukSigned-off-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NChen Jun <chenjun102@huawei.com> Reviewed-by: NWeilong Chen <chenweilong@huawei.com> Acked-by: NWeilong Chen <chenweilong@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录