]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Jan 2025 09:34:19 +0000 (10:34 +0100)
commitb8ed09e397f8e4277c26ca0dfea3f78b72244557
tree3823b2558830394cbb798f60b20971ba9a55643b
parent4524a8d175f03917d57a92853b45af0caa412305
scsi: mpi3mr: Synchronize access to ioctl data buffer

[ Upstream commit 367ac16e5ff2dcd6b7f00a8f94e6ba98875cb397 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/mpi3mr/mpi3mr_app.c