vhost: avoid use-after-free of vhost task

Change-Id: Ifd4f717ea6e12769c845e10578517da0a28dca11
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/364669
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Daniel Verkamp 2017-06-08 09:54:11 -07:00
parent 166d7ac414
commit 7c418a74cb

View File

@ -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 *