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
This commit is contained in:
Mark Johnston 2023-12-25 20:42:04 -05:00
parent abbc260f74
commit f450277f7a

View File

@ -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));