git: 3b0a51cc8731 - stable/14 - ptrace: Propagate errors from set_fpregs()

Konstantin Belousov <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a72d7ce.250ba.2a22ed4e__30832.829517179$1785911358$gmane$org@gitrepo.freebsd.org>
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=3b0a51cc8731e12c4947cadd612562868639a2c3

commit 3b0a51cc8731e12c4947cadd612562868639a2c3
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-07-31 19:47:20 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-08-05 06:23:21 +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 4dd700b23325..45c002e2d763 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -2334,14 +2334,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.