summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/gvt.h
diff options
context:
space:
mode:
authorJike Song <jike.song@intel.com>2016-12-16 05:51:06 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2016-12-26 04:45:29 +0300
commit364fb6b789ffce44c1b5429086c47b0df6c36aff (patch)
tree92a2937bb6db3d07dd245c7a7f84a3fa1127f8be /drivers/gpu/drm/i915/gvt/gvt.h
parentfaaaa53bdc6750c438887d44f99b60ad97ec74b4 (diff)
downloadlinux-364fb6b789ffce44c1b5429086c47b0df6c36aff.tar.xz
drm/i915/gvt/kvmgt: prevent double-release of vgpu
The release action might be triggered from either user's closing mdev or the detaching event of kvm and vfio_group, so this patch introduces an atomic to prevent double-release. Signed-off-by: Jike Song <jike.song@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/gvt.h')
-rw-r--r--drivers/gpu/drm/i915/gvt/gvt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
index ad0e9364ee70..0af17016f33f 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.h
+++ b/drivers/gpu/drm/i915/gvt/gvt.h
@@ -175,6 +175,7 @@ struct intel_vgpu {
struct notifier_block group_notifier;
struct kvm *kvm;
struct work_struct release_work;
+ atomic_t released;
} vdev;
#endif
};