From: Nicholas Bellinger Date: Fri, 30 Jan 2015 01:21:13 +0000 (-0800) Subject: vhost/scsi: Fix incorrect early vhost_scsi_handle_vq failures X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~13^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de1419e42088e99f8f839710c42aec759e45de77;p=pandora-kernel.git 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 Cc: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed