Skip to content

Commit

Permalink
um: Fix the return value of elf_core_copy_task_fpregs
Browse files Browse the repository at this point in the history
[ Upstream commit 865e3845eeaa21e9a62abc1361644e67124f1ec0 ]

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

Fixes: d1254b1 ("uml: fix x86_64 core dump crash")
Signed-off-by: Tiwei Bie <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
btw616 authored and gregkh committed Dec 5, 2024
1 parent 4fbbee6 commit 8ff0752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/um/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,6 @@ int elf_core_copy_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;
}

0 comments on commit 8ff0752

Please sign in to comment.