summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@fedoraproject.org>2016-01-08 12:35:55 -0500
committerJosh Boyer <jwboyer@fedoraproject.org>2016-01-08 12:36:00 -0500
commit5e3141a50f248348758976a95fef4bcb47f7a392 (patch)
tree5b46311a8af72470ff2bf59e9787346051af8616
parenta86f9a6012e8d186ea8e70cba6c1199acd54ed62 (diff)
downloadkernel-5e3141a50f248348758976a95fef4bcb47f7a392.tar.gz
kernel-5e3141a50f248348758976a95fef4bcb47f7a392.tar.xz
kernel-5e3141a50f248348758976a95fef4bcb47f7a392.zip
Fix oops in nouveau driver for devices that don't have a PMU (rhbz 1296820)
-rw-r--r--drm-nouveau-pmu-do-not-assume-a-PMU-is-present.patch31
-rw-r--r--kernel.spec4
2 files changed, 35 insertions, 0 deletions
diff --git a/drm-nouveau-pmu-do-not-assume-a-PMU-is-present.patch b/drm-nouveau-pmu-do-not-assume-a-PMU-is-present.patch
new file mode 100644
index 000000000..6ad5796e8
--- /dev/null
+++ b/drm-nouveau-pmu-do-not-assume-a-PMU-is-present.patch
@@ -0,0 +1,31 @@
+From 65fbb05cbbf9ef7f531712634c3e914b54171707 Mon Sep 17 00:00:00 2001
+From: Alexandre Courbot <acourbot@nvidia.com>
+Date: Thu, 3 Sep 2015 17:39:52 +0900
+Subject: [PATCH] drm/nouveau/pmu: do not assume a PMU is present
+
+Some devices may not have a PMU. Avoid a NULL pointer dereference in
+such cases by checking whether the pointer given to nvkm_pmu_pgob() is
+valid.
+
+Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+---
+ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
+index 27a79c0c3888..d95eb8659d1b 100644
+--- a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
++++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
+@@ -28,7 +28,7 @@
+ void
+ nvkm_pmu_pgob(struct nvkm_pmu *pmu, bool enable)
+ {
+- if (pmu->func->pgob)
++ if (pmu && pmu->func->pgob)
+ pmu->func->pgob(pmu, enable);
+ }
+
+--
+2.5.0
+
diff --git a/kernel.spec b/kernel.spec
index a68d4867d..8477bd0d8 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -659,6 +659,9 @@ Patch606: HID-multitouch-Fetch-feature-reports-on-demand-for-W.patch
#rhbz 1281368
Patch607: drm-nouveau-Fix-pre-nv50-pageflip-events-v4.patch
+#rhbz 1296820
+Patch608: drm-nouveau-pmu-do-not-assume-a-PMU-is-present.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -2103,6 +2106,7 @@ fi
#
%changelog
* Fri Jan 08 2016 Josh Boyer <jwboyer@fedoraproject.org>
+- Fix oops in nouveau driver for devices that don't have a PMU (rhbz 1296820)
- Fix warnings from pre-nv50 cards (rhbz 1281368)
- Fix touchpad on Dell XPS 13 9350 (rhbz 1296677)