summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Robinson <pbrobinson@gmail.com>2017-04-28 12:24:30 +0100
committerPeter Robinson <pbrobinson@gmail.com>2017-04-28 12:24:30 +0100
commit6f2fdb87a5c60d54467f193c4a5e786622073e7b (patch)
treeb44a46e9f34d49b551489588f45919a17f6d640d
parent62fcc3b0e8882f326f948461c721f4c1b03e2a9b (diff)
downloadkernel-6f2fdb87a5c60d54467f193c4a5e786622073e7b.tar.gz
kernel-6f2fdb87a5c60d54467f193c4a5e786622073e7b.tar.xz
kernel-6f2fdb87a5c60d54467f193c4a5e786622073e7b.zip
Upstream CEC patch to fix STi issues
-rw-r--r--kernel.spec6
-rw-r--r--media-cec-Fix-runtime-BUG-when-CONFIG_RC_CORE-CEC_CAP_RC.patch45
2 files changed, 51 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index 7b3417437..128e977c6 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -554,6 +554,9 @@ Patch437: bcm283x-hdmi-audio.patch
# https://www.spinics.net/lists/arm-kernel/msg554183.html
Patch438: arm-imx6-hummingboard2.patch
+# https://lkml.org/lkml/2017/4/4/316
+Patch339: media-cec-Fix-runtime-BUG-when-CONFIG_RC_CORE-CEC_CAP_RC.patch
+
Patch440: arm64-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch
Patch460: lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
@@ -2183,6 +2186,9 @@ fi
#
#
%changelog
+* Fri Apr 28 2017 Peter Robinson <pbrobinson@fedoraproject.org>
+- Upstream CEC patch to fix STi issues
+
* Thu Apr 27 2017 Laura Abbott <labbott@fedoraproject.org> - 4.11.0-0.rc8.git3.1
- Linux v4.11-rc8-75-gf832460
diff --git a/media-cec-Fix-runtime-BUG-when-CONFIG_RC_CORE-CEC_CAP_RC.patch b/media-cec-Fix-runtime-BUG-when-CONFIG_RC_CORE-CEC_CAP_RC.patch
new file mode 100644
index 000000000..7a29d72bf
--- /dev/null
+++ b/media-cec-Fix-runtime-BUG-when-CONFIG_RC_CORE-CEC_CAP_RC.patch
@@ -0,0 +1,45 @@
+From patchwork Tue Apr 4 12:32:19 2017
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [2/2, media] cec: Fix runtime BUG when (CONFIG_RC_CORE && !CEC_CAP_RC)
+From: Lee Jones <lee.jones@linaro.org>
+X-Patchwork-Id: 9661691
+Message-Id: <20170404123219.22040-2-lee.jones@linaro.org>
+To: hans.verkuil@cisco.com,
+ mchehab@kernel.org
+Cc: benjamin.gaignard@st.com, patrice.chotard@st.com,
+ linux-kernel@vger.kernel.org, kernel@stlinux.com,
+ Lee Jones <lee.jones@linaro.org>, linux-arm-kernel@lists.infradead.org,
+ linux-media@vger.kernel.org
+Date: Tue, 4 Apr 2017 13:32:19 +0100
+
+Currently when the RC Core is enabled (reachable) core code located
+in cec_register_adapter() attempts to populate the RC structure with
+a pointer to the 'parent' passed in by the caller.
+
+Unfortunately if the caller did not specify RC capibility when calling
+cec_allocate_adapter(), then there will be no RC structure to populate.
+
+This causes a "NULL pointer dereference" error.
+
+Fixes: f51e80804f0 ("[media] cec: pass parent device in register(), not allocate()")
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+---
+ drivers/media/cec/cec-core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/media/cec/cec-core.c b/drivers/media/cec/cec-core.c
+index 06a312c..d64937b 100644
+--- a/drivers/media/cec/cec-core.c
++++ b/drivers/media/cec/cec-core.c
+@@ -286,8 +286,8 @@ int cec_register_adapter(struct cec_adapter *adap,
+ adap->devnode.dev.parent = parent;
+
+ #if IS_REACHABLE(CONFIG_RC_CORE)
+- adap->rc->dev.parent = parent;
+ if (adap->capabilities & CEC_CAP_RC) {
++ adap->rc->dev.parent = parent;
+ res = rc_register_device(adap->rc);
+
+ if (res) {