Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Dec 2023 02:04:26 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f450277f7a60 - main - thread: Ignore errors when copying out during thr_exit()
Message-ID:  <202312260204.3BQ24QWf003302@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

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

commit f450277f7a608f26624384e046c1987490c51296
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-26 01:42:04 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-12-26 02:04:00 +0000

    thread: Ignore errors when copying out during thr_exit()
    
    It does not seem reasonable to return to userspace after calling
    umtx_thread_exit().
    
    This is in preparation for annotating copyin() and related functions
    with __result_use_check.
    
    Reviewed by:    olce, kib
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D43143
---
 sys/kern/kern_thr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 544479fc9f13..e2f1b6baca4b 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -315,8 +315,8 @@ sys_thr_exit(struct thread *td, struct thr_exit_args *uap)
 
 	/* Signal userland that it can free the stack. */
 	if ((void *)uap->state != NULL) {
-		suword_lwpid(uap->state, 1);
-		kern_umtx_wake(td, uap->state, INT_MAX, 0);
+		(void)suword_lwpid(uap->state, 1);
+		(void)kern_umtx_wake(td, uap->state, INT_MAX, 0);
 	}
 
 	return (kern_thr_exit(td));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312260204.3BQ24QWf003302>