summaryrefslogtreecommitdiff
path: root/rust/helpers/cpumask.c
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2025-05-20 11:26:58 +0300
committerMika Kahola <mika.kahola@intel.com>2025-06-05 15:37:50 +0300
commitc206a27eb72f13d345d51818152e8707d4563b51 (patch)
tree22209dd4d417dbdaa1de2eb67b79dfdd0c382f56 /rust/helpers/cpumask.c
parente117100acb6d2dd90da01a88616a3b9261b0e99a (diff)
drm/i915/dkl: return if tc_port is invalid in dkl_phy_set_hip_idx()
In dkl_phy_set_hip_idx(), we may try to shift a value negatively, whose behavior is undefined. This can happen because we define TC_PORT_NONE to -1, so theoretically tc_port could be -1. We will then use tc_port to shift to the correct address of the specified port, but if it's negative, anything can happen. If this happens or tc_port exceeds I915_MAX_TC_PORTS, it's safer to return with a warning than risk an invalid write. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com> Link: https://lore.kernel.org/r/20250520082917.1302665-2-luciano.coelho@intel.com
Diffstat (limited to 'rust/helpers/cpumask.c')
0 files changed, 0 insertions, 0 deletions