drm/i915/gvt/kvmgt: prevent double-release of vgpu
authorJike Song <jike.song@intel.com>
Fri, 16 Dec 2016 02:51:06 +0000 (10:51 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 26 Dec 2016 01:45:29 +0000 (09:45 +0800)
commit364fb6b789ffce44c1b5429086c47b0df6c36aff
tree92a2937bb6db3d07dd245c7a7f84a3fa1127f8be
parentfaaaa53bdc6750c438887d44f99b60ad97ec74b4
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>
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/kvmgt.c