Commit e920be83 authored by Bryant G. Ly's avatar Bryant G. Ly Committed by Greg Kroah-Hartman

ibmvscsis: Clear left-over abort_cmd pointers

commit 98883f1b upstream.

With the addition of ibmvscsis->abort_cmd pointer within
commit 25e78531 ("ibmvscsis: Do not send aborted task response"),
make sure to explicitly NULL these pointers when clearing
DELAY_SEND flag.

Do this for two cases, when getting the new new ibmvscsis
descriptor in ibmvscsis_get_free_cmd() and before posting
the response completion in ibmvscsis_send_messages().
Signed-off-by: default avatarBryant G. Ly <bryantly@linux.vnet.ibm.com>
Reviewed-by: default avatarMichael Cyr <mikecyr@linux.vnet.ibm.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1fb66c6a
...@@ -1170,6 +1170,8 @@ static struct ibmvscsis_cmd *ibmvscsis_get_free_cmd(struct scsi_info *vscsi) ...@@ -1170,6 +1170,8 @@ static struct ibmvscsis_cmd *ibmvscsis_get_free_cmd(struct scsi_info *vscsi)
cmd = list_first_entry_or_null(&vscsi->free_cmd, cmd = list_first_entry_or_null(&vscsi->free_cmd,
struct ibmvscsis_cmd, list); struct ibmvscsis_cmd, list);
if (cmd) { if (cmd) {
if (cmd->abort_cmd)
cmd->abort_cmd = NULL;
cmd->flags &= ~(DELAY_SEND); cmd->flags &= ~(DELAY_SEND);
list_del(&cmd->list); list_del(&cmd->list);
cmd->iue = iue; cmd->iue = iue;
...@@ -1774,6 +1776,7 @@ static void ibmvscsis_send_messages(struct scsi_info *vscsi) ...@@ -1774,6 +1776,7 @@ static void ibmvscsis_send_messages(struct scsi_info *vscsi)
if (cmd->abort_cmd) { if (cmd->abort_cmd) {
retry = true; retry = true;
cmd->abort_cmd->flags &= ~(DELAY_SEND); cmd->abort_cmd->flags &= ~(DELAY_SEND);
cmd->abort_cmd = NULL;
} }
/* /*
......
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