]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qla2xxx: Fix crash in qla2x00_abort_all_cmds() on unload
authorRoland Dreier <roland@purestorage.com>
Thu, 22 Sep 2011 07:06:05 +0000 (00:06 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 16 Dec 2011 22:29:26 +0000 (14:29 -0800)
commitf676b99f51d7234b88c2eb0a42ec40a0856d581e
treee139cc3c4d7ae484ec256090e7554bd8047fc2bb
parent45bd093492e3ac617ba91b05a961b257fee30ee8
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: Roland Dreier <roland@purestorage.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_os.c