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

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
rG6bfb7306ef92: mpi3mr: Check for copyin errors in mpi3mr_map_data_buffer_dma()
Branches
Unknown
Tags
Unknown