]> git.baikalelectronics.ru Git - kernel.git/commit
qla2xxx: Don't crash if we can't find cmd for failed CTIO
authorRoland Dreier <roland@purestorage.com>
Tue, 12 Jun 2012 01:23:15 +0000 (18:23 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 13 Jun 2012 03:12:26 +0000 (20:12 -0700)
commit64ed8b69f176e0656d2bb701f1c10c49ee595ca4
treeed7d94d74e2eb78b5ed2bf93cdd8cdd0fd2371ef
parent870396b8c0ef5f6c7f1c8f7af1deb40b172dce06
qla2xxx: Don't crash if we can't find cmd for failed CTIO

In qlt_do_ctio_completion(), there's no point in calling
qlt_term_ctio_exchange() with a NULL cmd -- all that it does is crash
in a NULL pointer dereference, since it does

qlt_send_term_exchange(vha, cmd, &cmd->atio, 1);

and dereferencing &cmd->atio is a bad idea if cmd itself is NULL.

If we really need to do this, we could take the values from the
failed CTIO we're processing, but it's not clear if it's worth
the replumbing to do that.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/scsi/qla2xxx/qla_target.c