]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.15.10/drm-i915-check-for-fused-or-unused-pipes.patch
Fix up backported ptrace patch
[thirdparty/kernel/stable-queue.git] / releases / 4.15.10 / drm-i915-check-for-fused-or-unused-pipes.patch
CommitLineData
bbecac5b
GKH
1From 9965db26ac0548648309f506dc155a92daa2158f Mon Sep 17 00:00:00 2001
2From: Mika Kahola <mika.kahola@intel.com>
3Date: Mon, 18 Dec 2017 10:04:03 +0200
4Subject: drm/i915: Check for fused or unused pipes
5
6From: Mika Kahola <mika.kahola@intel.com>
7
8commit 9965db26ac0548648309f506dc155a92daa2158f upstream.
9
10We may have fused or unused pipes in our system. Let's check that the pipe
11in question is within limits of accessible pipes. In case, that we are not
12able to access the pipe, we return early with a warning.
13
14v2: Rephrasing of the commit message (Jani)
15
16Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206
17Reported-by: Thomas Gleixner <tglx@linutronix.de>
18Tested-by: Jaswinder Singh Rajput <jaswinder@perfectintelligent.com>
19Suggested-by: Jani Nikula <jani.nikula@intel.com>
20Reviewed-by: Jani Nikula <jani.nikula@intel.com>
21Signed-off-by: Mika Kahola <mika.kahola@intel.com>
22Signed-off-by: Jani Nikula <jani.nikula@intel.com>
23Link: https://patchwork.freedesktop.org/patch/msgid/1513584243-12607-1-git-send-email-mika.kahola@intel.com
24(cherry picked from commit 0b7029b7e43fda1304c181a3ade0b429b9edcd9d)
25Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
26Cc: <stable@vger.kernel.org> # v4.10+
27Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28
29---
30 drivers/gpu/drm/i915/intel_audio.c | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
32
33--- a/drivers/gpu/drm/i915/intel_audio.c
34+++ b/drivers/gpu/drm/i915/intel_audio.c
35@@ -754,7 +754,7 @@ static struct intel_encoder *get_saved_e
36 {
37 struct intel_encoder *encoder;
38
39- if (WARN_ON(pipe >= INTEL_INFO(dev_priv)->num_pipes))
40+ if (WARN_ON(pipe >= ARRAY_SIZE(dev_priv->av_enc_map)))
41 return NULL;
42
43 /* MST */