Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/dsi: correct DSI id bounds check during registration

Check DSI instance id argument against the proper boundary size
to protect against invalid configuration of the DSI id.

Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>

authored by

Lloyd Atkinson and committed by
Rob Clark
6e1787cf f0efc831

+1 -1
+1 -1
drivers/gpu/drm/msm/dsi/dsi_manager.c
··· 862 862 int id = msm_dsi->id; 863 863 int ret; 864 864 865 - if (id > DSI_MAX) { 865 + if (id >= DSI_MAX) { 866 866 pr_err("%s: invalid id %d\n", __func__, id); 867 867 return -EINVAL; 868 868 }