]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netmap: Ignore errors in CSB_WRITE()
authorMark Johnston <markj@FreeBSD.org>
Wed, 27 Dec 2023 15:13:29 +0000 (10:13 -0500)
committerMark Johnston <markj@FreeBSD.org>
Wed, 27 Dec 2023 15:13:29 +0000 (10:13 -0500)
commit99efa2c88d93c6272a8f54b18d18d0fd9d60f137
tree437d8d0e47ef5620c22d826fd207286242d24842
parentb9924c202fc34004d4164cdc50f88d8fcef26279
netmap: Ignore errors in CSB_WRITE()

The CSB_WRITE() and _READ() macros respectively write to and read from
userspace memory and so can in principle fault.  However, we do not
check for errors and will proceed blindly if they fail.  Add assertions
to verify that they do not.

This is in preparation for annotating copyin() and related functions
with __result_use_check.

Reviewed by: vmaffione
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43200
sys/dev/netmap/netmap_kern.h