]> git.hungrycats.org Git - linux/commitdiff
um: Fix the return value of elf_core_copy_task_fpregs
authorTiwei Bie <tiwei.btw@antgroup.com>
Fri, 13 Sep 2024 02:33:02 +0000 (10:33 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 10 Oct 2024 10:02:40 +0000 (12:02 +0200)
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>
Link: https://patch.msgid.link/20240913023302.130300-1-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/kernel/process.c

index be2856af6d4c31fdc5b974bf6d1659c9f4e22c74..9c6cf03ed02b03e186a1d64c34ef40cad050d486 100644 (file)
@@ -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;
 }