mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/i915/display: check configuration index before shifting
The calc_allowed_config_filter() function passes the return value of iter_pos_to_idx() directly to BIT(), but the helper can return -1 for an invalid iterator. The iterator already rejects negative indices before doing a configuration, so this should not matter in normal flows. In any case, for robustness, check the index explicitly and warn if it is negative, avoiding an undefined shift. Fixes:39e30bdf2f("drm/i915/dp_link_caps: Add link configuration iterator") Reviewed-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20260908100659.113555-1-luciano.coelho@intel.com Signed-off-by: Luca Coelho <luciano.coelho@intel.com> (cherry picked from commitfe05cb9b9f) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
fd73f4a665
commit
ee415ce8cb
1 changed files with 8 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue