Skip to content
Commit 9bfacd01 authored by Roland Dreier's avatar Roland Dreier Committed by James Bottomley
Browse files

[SCSI] qla2xxx: Fix crash in qla2x00_abort_all_cmds() on unload



I hit a crash in qla2x00_abort_all_cmds() if the qla2xxx module is
unloaded right after it is loaded.  I debugged this down to the abort
handling improperly treating a command of type SRB_ADISC_CMD as if it
had a bsg_job to complete when that command actually uses the iocb_cmd
part of the union.  (I guess to hit this one has to unload the module
while the async FC initialization is still in progress)

It seems we should only look for a bsg_job if type is SRB_ELS_CMD_RPT,
SRB_ELS_CMD_HST or SRB_CT_CMD, so switch the test to make that explicit.

Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Acked-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Cc: stable@kernel.org
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent f72a209a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment