linux-um archives
 help / color / mirror / Atom feed
* [PATCH] um: Fix the return value of elf_core_copy_task_fpregs
@ 2024-08-28 13:51 Tiwei Bie
  2024-09-12 18:51 ` Richard Weinberger
  0 siblings, 1 reply; 3+ messages in thread
From: Tiwei Bie @ 2024-08-28 13:51 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes; +Cc: linux-um, linux-kernel, Tiwei Bie

This function is expected to return a boolean value, which should be
true on success and false on failure.

Fixes: d1254b12c93e ("uml: fix x86_64 core dump crash")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
 arch/um/kernel/process.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index be2856af6d4c..3cc2b663aa78 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -291,7 +291,8 @@ unsigned long __get_wchan(struct task_struct *p)
 int elf_core_copy_task_fpregs(struct task_struct *t, elf_fpregset_t *fpu)
 {
 	int cpu = current_thread_info()->cpu;
+	int pid = userspace_pid[cpu];
 
-	return save_i387_registers(userspace_pid[cpu], (unsigned long *) fpu);
+	return save_i387_registers(pid, (unsigned long *) fpu) == 0;
 }
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-13  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-28 13:51 [PATCH] um: Fix the return value of elf_core_copy_task_fpregs Tiwei Bie
2024-09-12 18:51 ` Richard Weinberger
2024-09-13  2:20   ` Tiwei Bie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox