2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 19:53:59 +08:00
linux-next/drivers/scsi/cxlflash
Manoj Kumar fa4aa632da cxlflash: Fix to avoid invalid port_sel value
If two concurrent MANAGE_LUN ioctls are issued with the same
WWID parameter, it would result in an incorrect value of port_sel.

This is because port_sel is modified without any locks being
held. If the first caller stalls after the return from
find_and_create_lun(), the value of port_sel will be set
incorrectly to indicate a single port, though in this case
it should have been set to both ports.

To fix, use the global mutex to serialize the lookup of the
WWID and the subsequent modification of port_sel.

Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-10-30 16:57:21 +09:00
..
common.h cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
Kconfig
lunmgt.c cxlflash: Fix to avoid invalid port_sel value 2015-10-30 16:57:21 +09:00
main.c cxlflash: Remove unused variable from queuecommand 2015-08-26 18:08:47 -07:00
main.h
Makefile cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
sislite.h cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
superpipe.c cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
superpipe.h cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
vlun.c cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
vlun.h cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00