[Intel-gfx][PATCH v2] drm/i915/gvt: Prevent NULL pointer dereference in intel_vgpu_reg_rw_edid()

2020-09-08 Thread Alejandro Sior
ret to a negative value, making the module simply indicate that the access to EDID region has failed, without any fatal repercussion. Signed-off-by: Alejandro Sior --- Changes in v2: - removed middle name of author to comply with git name - rephrased the patch description with imperative

[PATCH] Fixed NULL pointer dereference in handle_edid functions for GPUs that do not support EDID

2020-09-08 Thread Alejandro Sior
In the function intel_vgpu_reg_rw_edid of gvt/kvmgt.c, pos can get equal to NULL for GPUs that do not properly support EDID. In those cases, when pos gets passed to the handle_edid functions, it gets added a short offset then it's dereferenced in memcpy's, leading to a kernel oops: null pointer