Commit 7c418a74 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

vhost: avoid use-after-free of vhost task



Change-Id: Ifd4f717ea6e12769c845e10578517da0a28dca11
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/364669


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent 166d7ac4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,8 +67,8 @@ spdk_vhost_task_free_cb(struct spdk_scsi_task *scsi_task)
{
	struct spdk_vhost_task *task = container_of(scsi_task, struct spdk_vhost_task, scsi);

	rte_mempool_put(g_task_pool, task);
	spdk_vhost_dev_task_unref((struct spdk_vhost_dev *) task->svdev);
	rte_mempool_put(g_task_pool, task);
}

struct spdk_vhost_task *