aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2009-03-05 14:07:00 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-10 10:27:53 -0400
commit6431c5dc5eeaa79863b4af300c081a01e2ccd0bb (patch)
treeb4c2c7f3c0a5e3e4f810fb73356e63d3db5eab70 /drivers/scsi/qla2xxx
parent4469c195da43bf8220f53da8b576c0e154c2b662 (diff)
[SCSI] qla2xxx: Correct address range checking for option-rom updates.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index f4c57227ec18..ee9d40152430 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -244,12 +244,6 @@ qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj,
244 if (ha->optrom_state != QLA_SWAITING) 244 if (ha->optrom_state != QLA_SWAITING)
245 break; 245 break;
246 246
247 if (start & 0xfff) {
248 qla_printk(KERN_WARNING, ha,
249 "Invalid start region 0x%x/0x%x.\n", start, size);
250 return -EINVAL;
251 }
252
253 ha->optrom_region_start = start; 247 ha->optrom_region_start = start;
254 ha->optrom_region_size = start + size > ha->optrom_size ? 248 ha->optrom_region_size = start + size > ha->optrom_size ?
255 ha->optrom_size - start : size; 249 ha->optrom_size - start : size;
@@ -303,8 +297,7 @@ qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj,
303 else if (start == (ha->flt_region_boot * 4) || 297 else if (start == (ha->flt_region_boot * 4) ||
304 start == (ha->flt_region_fw * 4)) 298 start == (ha->flt_region_fw * 4))
305 valid = 1; 299 valid = 1;
306 else if ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && 300 else if (IS_QLA25XX(ha) || IS_QLA81XX(ha))
307 start == (ha->flt_region_vpd_nvram * 4))
308 valid = 1; 301 valid = 1;
309 if (!valid) { 302 if (!valid) {
310 qla_printk(KERN_WARNING, ha, 303 qla_printk(KERN_WARNING, ha,