]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Aug 2023 10:16:03 +0000 (12:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Aug 2023 10:16:03 +0000 (12:16 +0200)
added patches:
drm-i915-fix-error-handling-if-driver-creation-fails-during-probe.patch

queue-6.4/drm-i915-fix-error-handling-if-driver-creation-fails-during-probe.patch [new file with mode: 0644]
queue-6.4/series

diff --git a/queue-6.4/drm-i915-fix-error-handling-if-driver-creation-fails-during-probe.patch b/queue-6.4/drm-i915-fix-error-handling-if-driver-creation-fails-during-probe.patch
new file mode 100644 (file)
index 0000000..9ef8f92
--- /dev/null
@@ -0,0 +1,37 @@
+From 718551bbed3ca5308a9f9429305dd074727e8d46 Mon Sep 17 00:00:00 2001
+From: Matt Roper <matthew.d.roper@intel.com>
+Date: Thu, 1 Jun 2023 10:38:04 -0700
+Subject: drm/i915: Fix error handling if driver creation fails during probe
+
+From: Matt Roper <matthew.d.roper@intel.com>
+
+commit 718551bbed3ca5308a9f9429305dd074727e8d46 upstream.
+
+If i915_driver_create() fails to create a valid 'i915' object, we
+should just disable the PCI device and return immediately without trying
+to call i915_probe_error() that relies on a valid i915 pointer.
+
+Fixes: 12e6f6dc78e4 ("drm/i915/display: Handle GMD_ID identification in display code")
+Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
+Closes: https://lore.kernel.org/all/55236f93-dcc5-481e-b788-9f7e95b129d8@kili.mountain/
+Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
+Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20230601173804.557756-1-matthew.d.roper@intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/i915_driver.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/i915/i915_driver.c
++++ b/drivers/gpu/drm/i915/i915_driver.c
+@@ -747,8 +747,8 @@ int i915_driver_probe(struct pci_dev *pd
+       i915 = i915_driver_create(pdev, ent);
+       if (IS_ERR(i915)) {
+-              ret = PTR_ERR(i915);
+-              goto out_pci_disable;
++              pci_disable_device(pdev);
++              return PTR_ERR(i915);
+       }
+       ret = i915_driver_early_probe(i915);
index 23288e4e9e465b6070a7d810816ac39d914c1bb8..37d6a25a282f7d1a02713a32becafd682e4d0cf5 100644 (file)
@@ -107,3 +107,4 @@ media-vcodec-fix-potential-array-out-of-bounds-in-encoder-queue_setup.patch
 pci-acpiphp-use-pci_assign_unassigned_bridge_resources-only-for-non-root-bus.patch
 thunderbolt-fix-thunderbolt-3-display-flickering-issue-on-2nd-hot-plug-onwards.patch
 can-raw-add-missing-refcount-for-memory-leak-fix.patch
+drm-i915-fix-error-handling-if-driver-creation-fails-during-probe.patch