drm/i915: Use after free in error path in intel_vgpu_create_workload()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 8 Aug 2019 10:32:36 +0000 (13:32 +0300)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 9 Aug 2019 08:04:18 +0000 (16:04 +0800)
commiteac4471d0882da14be652ef0a55b914145fab15a
tree2d22e7fff002f33d18cad0cea58871ad7a473144
parent4187414808095f645ca0661f8dde77617e2e7cb3
drm/i915: Use after free in error path in intel_vgpu_create_workload()

We can't free "workload" until after the printk or it's a use after
free.

Fixes: 2089a76ade90 ("drm/i915/gvt: Checking workload's gma earlier")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/scheduler.c