]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: Make function dpy_reg_mmio_readx safe
authorChangbin Du <changbin.du@intel.com>
Tue, 13 Jun 2017 02:15:26 +0000 (10:15 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 29 Jun 2017 03:15:11 +0000 (11:15 +0800)
commit585a4513a5c1b9bb12dc44cc809692eb529689a9
tree0cf1fff3514e338ea1721bb0f25ccb600da7f1a0
parentf84162cde08bdaeafeb3f87f2f50310538f699b4
drm/i915/gvt: Make function dpy_reg_mmio_readx safe

The dpy_reg_mmio_read_x functions directly copy 4 bytes data to the
target address with considering the length. If may cause the target
memory corrupted if the requested length less than 4 bytes. Fix it
for safety even we already have some checking to avoid this happen.
And for convince, the 3 functions are merged.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/handlers.c