Commit 8fbdac8c authored by Hiral Patel's avatar Hiral Patel Committed by James Bottomley

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: default avatarHiral Patel <hiral.patel@qlogic.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent d6b9b42b
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment