opnsense-src/sys/dev/ocs_fc
Mark Johnston d8fe1e4c5a 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)
2024-01-01 19:29:46 -05:00
..
ocs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_cam.c ocs_fc: Use xpt_path_sbuf() to copy the path to sbuf. 2023-12-27 17:49:51 +05:30
ocs_cam.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_common.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_ddump.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_ddump.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_device.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_device.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_domain.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_domain.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_drv_fc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_els.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_els.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_fabric.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_fabric.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_fcp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_gendump.c ocs_fs(4): Fix some common typos in source code comments 2021-08-28 18:24:08 +02:00
ocs_gendump.h ocs_fc: Add gendump and dump_to_host ioctl command support. 2021-07-06 21:08:11 +05:30
ocs_hw.c ocs_fc: IO timeout handling and error reporting fix. 2023-12-27 17:46:08 +05:30
ocs_hw.h ocs_fc: IO timeout handling and error reporting fix. 2023-12-27 17:46:08 +05:30
ocs_hw_queues.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_hw_queues.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_io.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_io.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_ioctl.c ocs: Check for copyin errors in the ioctl handler 2024-01-01 19:29:46 -05:00
ocs_ioctl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_list.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_mgmt.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_mgmt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_node.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_node.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_os.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_os.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_pci.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_scsi.c ocs_fc: IO timeout handling and error reporting fix. 2023-12-27 17:46:08 +05:30
ocs_scsi.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_sm.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_sm.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_sport.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_sport.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_stats.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_unsol.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_unsol.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_utils.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_utils.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_vpd.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ocs_xport.c ocs_fc: IO timeout handling and error reporting fix. 2023-12-27 17:46:08 +05:30
ocs_xport.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sli4.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sli4.h ocs_fc: IO timeout handling and error reporting fix. 2023-12-27 17:46:08 +05:30
version.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00