]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user/loongarch64: Fix setup_extcontext alloc wrong fpu_context size
authorSong Gao <gaosong@loongson.cn>
Wed, 1 Nov 2023 03:08:12 +0000 (11:08 +0800)
committerSong Gao <gaosong@loongson.cn>
Fri, 3 Nov 2023 06:13:22 +0000 (14:13 +0800)
See:
 https://github.com/torvalds/linux/blob/master/arch/loongarch/kernel/signal.c

The alloc size is sizeof(struct target_fpu_context).

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231101030816.2353416-3-gaosong@loongson.cn>

linux-user/loongarch64/signal.c

index afcee641a6d04981ba0f3f9cee618c259f37607c..6844f187ee6e85c45bfc9b54ce0170d4406e669c 100644 (file)
@@ -115,7 +115,7 @@ static abi_ptr setup_extcontext(struct extctx_layout *extctx, abi_ptr sp)
     /* For qemu, there is no lazy fp context switch, so fp always present. */
     extctx->flags = SC_USED_FP;
     sp = extframe_alloc(extctx, &extctx->fpu,
-                        sizeof(struct target_rt_sigframe), FPU_CTX_ALIGN, sp);
+                        sizeof(struct target_fpu_context), FPU_CTX_ALIGN, sp);
 
     return sp;
 }