drm/dp/mst: Validate REMOTE_I2C_READ harder
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 28 Sep 2018 18:04:00 +0000 (21:04 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 10 Dec 2018 21:37:53 +0000 (23:37 +0200)
commitcb8ce7111117e16a87f3f55c014ccd1f19f81016
tree234918241b8b45bda9e9250927698e47ba8c0063
parentc978ae9bde582e82a04c63a4071701691dd8b35c
drm/dp/mst: Validate REMOTE_I2C_READ harder

Make sure i2c msgs we're asked to transfer conform to the
requirements of REMOTE_I2C_READ. We were only checking that the
last message is a read, but we must also check that the preceding
messages are all writes. Also check that the length of each
message isn't too long.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180928180403.22499-2-ville.syrjala@linux.intel.com
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
drivers/gpu/drm/drm_dp_mst_topology.c