HomeFreeBSD

mpi3mr: Check for copyin errors in mpi3mr_map_data_buffer_dma()

Description

mpi3mr: Check for copyin errors in mpi3mr_map_data_buffer_dma()

A failed copyin will cause the driver to use the contents of
uninitialized buffers instead, which is unlikely to be the behaviour
that we want. Check for errors.

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

Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43098

(cherry picked from commit 6bfb7306ef92aaccffae42ed00ce6d7201b76966)

Details

Provenance
markjAuthored on Dec 26 2023, 1:38 AM
Reviewer
imp
Differential Revision
D43098: mpi3mr: Check for copyin errors in mpi3mr_map_data_buffer_dma()
Parents
rGf9946e9ae724: uhid: Check for errors from copyin() in ioctl handlers
Branches
Unknown
Tags
Unknown