vhost/scsi: Fix incorrect early vhost_scsi_handle_vq failures
vhost/scsi: Fix incorrect early vhost_scsi_handle_vq failures

This patch fixes vhost_scsi_handle_vq() failure cases that result in BUG_ON()
getting triggered when vhost_scsi_free_cmd() is called, and ->tvc_se_cmd has
not been initialized by target_submit_cmd_map_sgls().

It changes tcm_vhost_release_cmd() to use tcm_vhost_cmd->tvc_nexus for obtaining
se_session pointer reference.  Also, avoid calling put_page() on NULL sg->page
entries in vhost_scsi_map_to_sgl() failure path.

Cc: Michael S. Tsirkin <255103e50249e3d658441816e0597170ebfc16ef@redhat.com>
Cc: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>
Signed-off-by: Nicholas Bellinger <978acd1567d5598152161fdf8bf3ca568f950c9b@linux-iscsi.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs