HomeFreeBSD

hid: Handle errors from copyin() in ioctl handlers

Description

hid: Handle errors from copyin() in ioctl handlers

If copyin() fails, the driver will proceed blindly with a zeroed buffer,
which is not what we want. In preparation for annotating copyin() with
__result_use_check, start checking for errors.

Reviewed by: wulf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43102

Details

Provenance
markjAuthored on Dec 26 2023, 1:37 AM
Reviewer
wulf
Differential Revision
D43102: hid: Handle errors from copyin() in ioctl handlers
Parents
rG81eb7baa69e9: freebsd32: Report errors when copying out oldlenp in __sysctl
Branches
Unknown
Tags
Unknown