diff options
author | Hiral Patel <hiral.patel@qlogic.com> | 2015-08-04 17:37:56 (GMT) |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-08-27 00:44:45 (GMT) |
commit | 8fbdac8c70d378016f568106f09fb3ff153a47c3 (patch) | |
tree | 9f9380d681b753348f863a588a346236568bde02 | |
parent | d6b9b42b49518c30df9de92ce499f005d336e97b (diff) | |
download | linux-8fbdac8c70d378016f568106f09fb3ff153a47c3.tar.xz |
qla2xxx: Do not crash system for sp ref count zero
Aovid crashing the system in the scenario where firmware
just completes the command and it can not find the command
during abort mailbox processing. This scenario can lead to
sp reference counter being zero. Instead of crashing the
system, use WARN_ON to print warning in log file.
Signed-off-by: Hiral Patel <hiral.patel@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 5a5166b..8763c12 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -656,7 +656,7 @@ qla2x00_sp_compl(void *data, void *ptr, int res) "SP reference-count to ZERO -- sp=%p cmd=%p.\n", sp, GET_CMD_SP(sp)); if (ql2xextended_error_logging & ql_dbg_io) - BUG(); + WARN_ON(atomic_read(&sp->ref_count) == 0); return; } if (!atomic_dec_and_test(&sp->ref_count)) |