Patch "drm/i915/audio: fix check for av_enc_map overflow" has been added to the 4.15-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915/audio: fix check for av_enc_map overflow
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-audio-fix-check-for-av_enc_map-overflow.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
72a6d72c2cd03bba7b70117b63dea83d2de88057Mon Sep 17 00:00:00 2001
From: Jani Nikula <[email protected]>
Date: Wed, 14 Feb 2018 19:38:40 +0200
Subject: drm/i915/audio: fix check for av_enc_map overflow
From: Jani Nikula <[email protected]>
commit 72a6d72c2cd03bba7b70117b63dea83d2de88057 upstream.
Turns out -1 >= ARRAY_SIZE() is always true. Move the bounds check where we know pipe >= 0 and next to the array indexing where it makes most sense.
--- drivers/gpu/drm/i915/intel_audio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_audio.c +3 -3
@@ -754,11 +754,11 @@ static struct intel_encoder *get_saved_e {struct intel_encoder *encoder; -if (WARN_ON (pipe >=ARRAY_SIZE (dev_priv->av_enc_map))) -return NULL ; -/* MST */ if (pipe >=0 ) { +if (WARN_ON (pipe >=ARRAY_SIZE (dev_priv->av_enc_map))) +return NULL ; + encoder = dev_priv->av_enc_map[pipe];/* * when bootup, audio driver may not know it is
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/drm-i915-audio-fix-check-for-av_enc_map-overflow.patch queue-4.15/documentation-sphinx-fix-directive-import-error.patch queue-4.15/drm-i915-check-for-fused-or-unused-pipes.patch