Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Patch "gpu: Fix uninitialized buddy for built-in drivers" has been added to the 6.18-stable tree
@ 2026-07-30 13:28 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2026-07-30 13:28 UTC (permalink / raw)
  To: airlied, gregkh, intel-xe, joelagnelf, koen.koning, peter.senna
  Cc: stable-commits


This is a note to let you know that I've just added the patch titled

    gpu: Fix uninitialized buddy for built-in drivers

to the 6.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gpu-fix-uninitialized-buddy-for-built-in-drivers.patch
and it can be found in the queue-6.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From cc27314c67516c138ee3829197d1c3b998e29fae Mon Sep 17 00:00:00 2001
From: Koen Koning <koen.koning@linux.intel.com>
Date: Fri, 13 Feb 2026 16:20:47 +0100
Subject: gpu: Fix uninitialized buddy for built-in drivers

From: Koen Koning <koen.koning@linux.intel.com>

commit cc27314c67516c138ee3829197d1c3b998e29fae upstream.

Move buddy to the start of the link order, so its __init runs before any
other built-in drivers that may depend on it. Otherwise, a built-in
driver that tries to use the buddy allocator will run into a kernel NULL
pointer dereference because slab_blocks is uninitialized.

Specifically, this fixes drm/xe (as built-in) running into a kernel
panic during boot, because it uses buddy during device probe.

Fixes: ba110db8e1bc ("gpu: Move DRM buddy allocator one level up (part two)")
Cc: Joel Fernandes <joelagnelf@nvidia.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: intel-xe@lists.freedesktop.org
Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Peter Senna Tschudin <peter.senna@linux.intel.com>
Signed-off-by: Koen Koning <koen.koning@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/20260213152047.179628-1-koen.koning@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/gpu/Makefile
+++ b/drivers/gpu/Makefile
@@ -2,8 +2,9 @@
 # drm/tegra depends on host1x, so if both drivers are built-in care must be
 # taken to initialize them in the correct order. Link order is the only way
 # to ensure this currently.
+# Similarly, buddy must come first since it is used by other drivers.
+obj-$(CONFIG_GPU_BUDDY)	+= buddy.o
 obj-y			+= host1x/ drm/ vga/ tests/
 obj-$(CONFIG_IMX_IPUV3_CORE)	+= ipu-v3/
 obj-$(CONFIG_TRACE_GPU_MEM)		+= trace/
 obj-$(CONFIG_NOVA_CORE)		+= nova-core/
-obj-$(CONFIG_GPU_BUDDY)		+= buddy.o


Patches currently in stable-queue which might be from koen.koning@linux.intel.com are

queue-6.18/gpu-fix-uninitialized-buddy-for-built-in-drivers.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-30 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 13:28 Patch "gpu: Fix uninitialized buddy for built-in drivers" has been added to the 6.18-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox