scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines
authorAndrew Vasquez <andrewv@marvell.com>
Tue, 2 Apr 2019 21:24:25 +0000 (14:24 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Apr 2019 03:45:53 +0000 (23:45 -0400)
commit5cbdae10bf11f96e30b4d14de7b08c8b490e903c
tree96b16f5e27ed0a04b5a0e68b23ba1f792938cc3e
parent5da05a26b8305a625bc9d537671b981795b46dab
scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines

Commit e6f77540c067 ("scsi: qla2xxx: Fix an integer overflow in sysfs
code") incorrectly set 'optrom_region_size' to 'start+size', which can
overflow option-rom boundaries when 'start' is non-zero.  Continue setting
optrom_region_size to the proper adjusted value of 'size'.

Fixes: e6f77540c067 ("scsi: qla2xxx: Fix an integer overflow in sysfs code")
Cc: stable@vger.kernel.org
Signed-off-by: Andrew Vasquez <andrewv@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_attr.c