]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt/kvmgt: check returned slot for gfn
authorJike Song <jike.song@intel.com>
Fri, 16 Dec 2016 02:51:05 +0000 (10:51 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 26 Dec 2016 01:45:29 +0000 (09:45 +0800)
commit327b372756c4ca0a16cd7a97bb8987d75d331106
tree5e1a0e43d3b4f64416770d2800fe98adf228e6f8
parent01ec49a53c390bfa04bd7513a2a75f3d35bb7932
drm/i915/gvt/kvmgt: check returned slot for gfn

gfn_to_memslot() may return NULL if the gfn is mmio
or invalid. A malicious user might input a bad gfn
to panic the host if we don't check it.

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