public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] gpu: Fix uninitialized buddy for built-in drivers
@ 2026-02-13 15:20 Koen Koning
  2026-02-13 17:27 ` Joel Fernandes
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Koen Koning @ 2026-02-13 15:20 UTC (permalink / raw)
  To: dri-devel
  Cc: Koen Koning, Joel Fernandes, Dave Airlie, intel-xe,
	Peter Senna Tschudin

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
Tested-by: Peter Senna Tschudin <peter.senna@linux.intel.com>
Signed-off-by: Koen Koning <koen.koning@linux.intel.com>
---
 drivers/gpu/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile
index 5cd54d06e262..b4e5e338efa2 100644
--- 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
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2026-02-22 20:25 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-13 15:20 [PATCH] gpu: Fix uninitialized buddy for built-in drivers Koen Koning
2026-02-13 17:27 ` Joel Fernandes
2026-02-16 10:28   ` Matthew Auld
2026-02-22 20:25     ` Claude review: " Claude Code Review Bot
2026-02-22 20:25   ` Claude Code Review Bot
2026-02-16 11:19 ` [PATCH v2] " Koen Koning
2026-02-16 21:31   ` Joel Fernandes
2026-02-19 10:16   ` Danilo Krummrich
2026-02-19 10:38     ` Matthew Auld
2026-02-19 11:14       ` Danilo Krummrich
2026-02-19 12:44         ` Matthew Auld
2026-02-19 12:56           ` Danilo Krummrich
2026-02-19 15:32             ` Matthew Auld
2026-02-19 16:08               ` Danilo Krummrich
2026-02-19 18:28             ` Koen Koning
2026-02-19 18:34               ` Danilo Krummrich
2026-02-19 21:38   ` [PATCH v3 0/3] gpu: fix module_init() usage Koen Koning
2026-02-19 21:38     ` [PATCH v3 1/3] gpu/buddy: " Koen Koning
2026-02-20  6:06       ` Greg KH
2026-02-20 10:17         ` Danilo Krummrich
2026-02-20 13:55           ` Joel Fernandes
2026-02-21  5:44             ` Greg KH
2026-02-19 21:38     ` [PATCH v3 2/3] drm/sched: " Koen Koning
2026-02-20  6:06       ` Greg KH
2026-02-19 21:38     ` [PATCH v3 3/3] drm/drv: " Koen Koning
2026-02-22 20:25     ` Claude review: gpu: " Claude Code Review Bot
2026-02-22 20:25 ` Claude review: gpu: Fix uninitialized buddy for built-in drivers Claude Code Review Bot

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