drm/i915/gvt/kvmgt: dereference the pointer within lock
authorJike Song <jike.song@intel.com>
Fri, 16 Dec 2016 02:51:04 +0000 (10:51 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 26 Dec 2016 01:45:29 +0000 (09:45 +0800)
commitbfeca3e5716a16b95a1fb7104e477ca3bd5ed59e
tree154723a3220195b1484c5eb186b50e9637d1a270
parentd650ac06023796ade7cb5ec4d5650c67dc494ed0
drm/i915/gvt/kvmgt: dereference the pointer within lock

Though there is no issue exposed yet, it's possible that another
thread releases the entry while our trying to deref it out of the
lock. Fit it by moving the dereference within lock.

Signed-off-by: Jike Song <jike.song@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/kvmgt.c