]> git.baikalelectronics.ru Git - kernel.git/commit
drm/mst: Add range check for max_payloads during init
authorImre Deak <imre.deak@intel.com>
Fri, 29 Jan 2016 12:44:29 +0000 (14:44 +0200)
committerDave Airlie <airlied@redhat.com>
Fri, 5 Feb 2016 05:23:48 +0000 (15:23 +1000)
commit03e9195bfa459b534f6f093452c607bcecf2180f
tree1a09af919fb8ab10db0d84a0b1440883ee89f913
parentcf26f2f2a70bb5c7e65df2cfefde73af7a6e83b1
drm/mst: Add range check for max_payloads during init

max_payload is limited by the space we have in
drm_dp_mst_topology_mgr::vcpi_mask,payload_mask. We need to track
max_payloads+1 IDs in these masks, see drm_dp_mst_assign_payload_id().
Add a sanity check for this.

Caught by coverity.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: David Weinehall <david.weinehall@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_dp_mst_topology.c