scsi: mpi3mr: Synchronize access to ioctl data buffer
authorRanjan Kumar <ranjan.kumar@broadcom.com>
Sun, 10 Nov 2024 19:44:01 +0000 (01:14 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 4 Dec 2024 17:21:05 +0000 (12:21 -0500)
commit367ac16e5ff2dcd6b7f00a8f94e6ba98875cb397
tree2c2b71a190fe7c747447ad6c9c22f1a1d704e510
parent6050471545eecec214ca9ceb38a63e98e9003338
scsi: mpi3mr: Synchronize access to ioctl data buffer

The driver serializes ioctls through a mutex lock but access to the
ioctl data buffer is not guarded by the mutex. This results in multiple
user threads being able to write to the driver's ioctl buffer
simultaneously.

Protect the ioctl buffer with the ioctl mutex.

Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Link: https://lore.kernel.org/r/20241110194405.10108-2-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi3mr_app.c