projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4910b52
)
scsi: qla2xxx: Prevent SysFS access when chip is down
author
Quinn Tran
<qtran@marvell.com>
Fri, 15 Feb 2019 22:37:18 +0000
(14:37 -0800)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Tue, 19 Feb 2019 23:58:36 +0000
(18:58 -0500)
Prevent user from sending commands through sysfs while FW is not running or
reset is in progress.
Signed-off-by: Quinn Tran <qtran@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
patch
|
blob
|
history
diff --git
a/drivers/scsi/qla2xxx/qla_attr.c
b/drivers/scsi/qla2xxx/qla_attr.c
index ee9f943f4d079fe0a9a7baa125c2ea1785dbf471..f8fd482a06e0c9a03f92e71260068399ad136ade 100644
(file)
--- a/
drivers/scsi/qla2xxx/qla_attr.c
+++ b/
drivers/scsi/qla2xxx/qla_attr.c
@@
-543,6
+543,9
@@
qla2x00_sysfs_write_vpd(struct file *filp, struct kobject *kobj,
if (unlikely(pci_channel_offline(ha->pdev)))
return 0;
+ if (qla2x00_chip_is_down(vha))
+ return 0;
+
if (!capable(CAP_SYS_ADMIN) || off != 0 || count != ha->vpd_size ||
!ha->isp_ops->write_nvram)
return 0;