]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
systm: Annotate copyin() and related functions with __result_use_check
authorMark Johnston <markj@FreeBSD.org>
Thu, 4 Jan 2024 17:02:04 +0000 (12:02 -0500)
committerMark Johnston <markj@FreeBSD.org>
Thu, 4 Jan 2024 17:02:04 +0000 (12:02 -0500)
commit8e36732e6eb50976ecc139a9c499f1396d340d1a
tree7d4e8a7105fc95a0252dac6658590b2eeb4974d6
parentf66370b48309741b99c37303fb37c64fd9181741
systm: Annotate copyin() and related functions with __result_use_check

Now that all in-tree callers check for errors (or cast them away), we
can ask the compiler to check that new code does the same.  This was
prompted by SA-23:18.nfsclient, which was caused by missing error
handling.  This change is a weak mitigation since code can easily fail
to propagate error handling to the right place, but it's better than
nothing.

Reviewed by: kib, jhb
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D43223
sys/sys/systm.h