Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-13 14:59:58 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-15 11:46:06 +0200
commita0298b0046c01b56b64cde1f903d97ecf59804fc (patch)
tree680c44dbbb27cf987267e042e8f0cc1b1a352ba1
parent8248e263d2998e7372ba3926fa4627ba2ccf1010 (diff)
drm/tegra: hub: Fix dereference before check (bsc#1111666).
-rw-r--r--patches.drm/drm-tegra-hub-Fix-dereference-before-check.patch41
-rw-r--r--series.conf1
2 files changed, 42 insertions, 0 deletions
diff --git a/patches.drm/drm-tegra-hub-Fix-dereference-before-check.patch b/patches.drm/drm-tegra-hub-Fix-dereference-before-check.patch
new file mode 100644
index 0000000000..b4702f538a
--- /dev/null
+++ b/patches.drm/drm-tegra-hub-Fix-dereference-before-check.patch
@@ -0,0 +1,41 @@
+From 7cf77b273a8fc51e7de622fa6691abd4436a9a6b Mon Sep 17 00:00:00 2001
+From: Thierry Reding <treding@nvidia.com>
+Date: Mon, 11 Feb 2019 11:51:20 +0100
+Subject: [PATCH] drm/tegra: hub: Fix dereference before check
+Git-commit: 7cf77b273a8fc51e7de622fa6691abd4436a9a6b
+Patch-mainline: v5.1-rc3
+References: bsc#1111666
+
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/tegra/hub.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c
+index ba9b3cfb8c3d..b3436c2aed68 100644
+--- a/drivers/gpu/drm/tegra/hub.c
++++ b/drivers/gpu/drm/tegra/hub.c
+@@ -378,14 +378,16 @@ static int tegra_shared_plane_atomic_check(struct drm_plane *plane,
+ static void tegra_shared_plane_atomic_disable(struct drm_plane *plane,
+ struct drm_plane_state *old_state)
+ {
+- struct tegra_dc *dc = to_tegra_dc(old_state->crtc);
+ struct tegra_plane *p = to_tegra_plane(plane);
++ struct tegra_dc *dc;
+ u32 value;
+
+ /* rien ne va plus */
+ if (!old_state || !old_state->crtc)
+ return;
+
++ dc = to_tegra_dc(old_state->crtc);
++
+ /*
+ * XXX Legacy helpers seem to sometimes call ->atomic_disable() even
+ * on planes that are already disabled. Make sure we fallback to the
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 3b8b35dbd7..5a5b9d2a76 100644
--- a/series.conf
+++ b/series.conf
@@ -45425,6 +45425,7 @@
patches.fixes/bpf-do-not-restore-dst_reg-when-cur_state-is-freed.patch
patches.drivers/bpf-verifier-propagate-liveness-on-all-frames.patch
patches.drivers/net-phy-don-t-clear-BMCR-in-genphy_soft_reset.patch
+ patches.drm/drm-tegra-hub-Fix-dereference-before-check.patch
patches.drm/drm-vgem-fix-use-after-free-when-drm_gem_handle_crea.patch
patches.drm/drm-vkms-fix-use-after-free-when-drm_gem_handle_crea.patch
patches.drm/0001-drm-rockchip-vop-reset-scale-mode-when-win-is-disabl.patch