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

(cherry picked from commit e452fa70d50761b5fe5f19c3c93c107be116728c)

Details

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