HomeFreeBSD

ocs: Check for copyin errors in the ioctl handler

Description

ocs: Check for copyin errors in the ioctl handler

If copyin() fails, the driver will blindly proceed with whatever had
been in the uninitialized DMA buffer. This is not what we want. Check
for copyin failures.

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

Reviewed by: ram
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43097

(cherry picked from commit a01ff11cb73d7a1988f6241f63d141371ff23717)

Details

Provenance
markjAuthored on Dec 26 2023, 1:38 AM
Reviewer
ram
Differential Revision
D43097: ocs: Check for copyin errors in the ioctl handler
Parents
rG8adca661c2bb: mpi3mr: Check for copyin errors in mpi3mr_map_data_buffer_dma()
Branches
Unknown
Tags
Unknown