]> 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)
commit4abea10f1d906b8d6dbd4d1cd38fec0c0a8654d4
tree6cbf86111841e1a988f5789dce28ebd2ebb70998
parentf7cd67db593b09671a1bde78ce81249cad2ae595
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: aa10a2462a3f ("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