]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: fix a bounds check in ring_id_to_context_switch_event()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Apr 2017 19:48:28 +0000 (22:48 +0300)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 18 Apr 2017 09:50:05 +0000 (17:50 +0800)
commit0b54d52d001b55b3b981c1fe2e32e531fab2a2e8
tree6cbf86111841e1a988f5789dce28ebd2ebb70998
parenta63d5a23bbecf0e152eeee3d438f9a91a6f920c2
drm/i915/gvt: fix a bounds check in ring_id_to_context_switch_event()

There are two bugs here.  The && should be || and the > is off by one so
it should be >= ARRAY_SIZE().

Fixes: 23f81cf622a8 ("drm/i915/gvt: vGPU execlist virtualization")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/execlist.c