git: 8b6210945336 - stable/15 - ptrace: Propagate errors from set_fpregs()

Konstantin Belousov <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a72d695.252cd.5df6ca0__21971.4220542059$1785910958$gmane$org@gitrepo.freebsd.org>
The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=8b62109453362e477791751a9754b9287ff76595

commit 8b62109453362e477791751a9754b9287ff76595
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-07-31 19:47:20 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-08-05 06:12:47 +0000

    ptrace: Propagate errors from set_fpregs()
    
    (cherry picked from commit 1932bd20ed53f2e695a576cffd183937ed25de3f)
---
 sys/kern/imgact_elf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index c27d61e81ed4..c91d985d5d77 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -2387,14 +2387,14 @@ __elfN(set_fpregset)(struct regset *rs, struct thread *td, void *buf,
 {
 	elf_prfpregset_t *fpregset;
 
-	fpregset = buf;
 	KASSERT(size == sizeof(*fpregset), ("%s: invalid size", __func__));
+
+	fpregset = buf;
 #if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
-	set_fpregs32(td, fpregset);
+	return (set_fpregs32(td, fpregset) == 0);
 #else
-	set_fpregs(td, fpregset);
+	return (set_fpregs(td, fpregset) == 0);
 #endif
-	return (true);
 }
 
 static struct regset __elfN(regset_fpregset) = {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.