OSDN Git Service

drm/i915/gvt: initialize dmabuf mutex in vgpu_create
authorHang Yuan <hang.yuan@linux.intel.com>
Mon, 30 Jul 2018 02:52:53 +0000 (10:52 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 14 Aug 2018 07:26:09 +0000 (15:26 +0800)
commitd6c6113bfe19af514128163a6d176437d45b7325
tree21885e025c8aa740eaa3fdf90bb20bc80b999eb1
parent3fd34ac02ae8cc20d78e3aed2cf6e67f0ae109ea
drm/i915/gvt: initialize dmabuf mutex in vgpu_create

Currently, the mutex used in GVT dmabuf support is not initialized until
vgpu device is opened. If one vgpu device is opened and then removed, the
mutex will be used in vgpu remove operation without initialization. This
patch initializes the mutex in vgpu create operation to avoid the problem.

Fixes: e546e281d33d("drm/i915/gvt: Dmabuf support for GVT-g")
Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/kvmgt.c
drivers/gpu/drm/i915/gvt/vgpu.c