tcmu: fix cmd user after free
authorMike Christie <mchristi@redhat.com>
Mon, 15 Jan 2018 20:37:59 +0000 (14:37 -0600)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 18 Jan 2018 09:21:23 +0000 (01:21 -0800)
commit45dc488c0ee19ba5cba7a67be473aeaf88a7447e
treea37b736ecadc936992f4fca4500ff2d1afc14e87
parentc82b59e7c3f81059b1d280e21028c7ac8451dd52
tcmu: fix cmd user after free

If we are failing the command due to a qfull timeout we are
also freeing the tcmu command, so we cannot access it later
to get the se_cmd.

Note: The clearing of cmd->se_cmd is not needed. We do not check
it later for something like determining if the command was failed
due to a timeout. As a result I am dropping it.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c