Skip to contentSkip to conversation

um: Fix the return value of elf_core_copy_task_fpregs

PATCH New Tiwei Bie 1 participant 1 message Sep 13, 2024 User-mode Linux (UML)

lore
Share & tools
lore

Tiwei Bie

author
#0 lore raw

PATCH v2 1/1 um: Fix the return value of elf_core_copy_task_fpregs

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")

---
v2:
- Drop the unnecessary new variable (suggested by Richard Weinberger);

 arch/um/kernel/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/kernel/process.c +1 -1
index be2856af6d4c..9c6cf03ed02b 100644
@@ -292,6 +292,6 @@ int elf_core_copy_task_fpregs(struct task_struct *t, elf_fpregset_t *fpu)
 {
 	int cpu = current_thread_info()->cpu;
 
-	return save_i387_registers(userspace_pid[cpu], (unsigned long *) fpu);
+	return save_i387_registers(userspace_pid[cpu], (unsigned long *) fpu) == 0;
 }
 
Signature · 1 line
2.34.1