From: Matthew Auld <matthew.auld@intel.com>
To: Danilo Krummrich <dakr@kernel.org>,
Koen Koning <koen.koning@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org,
Joel Fernandes <joelagnelf@nvidia.com>,
Dave Airlie <airlied@redhat.com>,
intel-xe@lists.freedesktop.org,
Peter Senna Tschudin <peter.senna@linux.intel.com>,
dri-devel <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v2] gpu: Fix uninitialized buddy for built-in drivers
Date: Thu, 19 Feb 2026 10:38:30 +0000 [thread overview]
Message-ID: <318f1dcc-bc95-473e-bdb3-7ea03708395c@intel.com> (raw)
In-Reply-To: <DGIUZHKY84DC.W1UXLGE5HDIS@kernel.org>
On 19/02/2026 10:16, Danilo Krummrich wrote:
> On Mon Feb 16, 2026 at 12:19 PM CET, Koen Koning wrote:
>> Use subsys_initcall instead of module_init for the GPU buddy allocator,
>> so its initialization code runs before any gpu drivers.
>> 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.
>
> I just noticed that this patch was sent twice, and I posted my feedback on [1]
> -- pasting it here as well.
>
>> Fixes: ba110db8e1bc ("gpu: Move DRM buddy allocator one level up (part two)")
>
> This Fixes: tag seems wrong. How is this code move related to this problem?
This popped up as a very recent regression for us internally. It looks
like it worked before since link order ensured drm_buddy came before all
the driver code. With above commit the link order changed and became
drm/ and then buddy. See [1] also, which is maybe clearer to see this.
[1]
https://lore.kernel.org/intel-xe/20260213152047.179628-1-koen.koning@linux.intel.com/
>
> This should rather be:
>
> Fixes: 6387a3c4b0c4 ("drm: move the buddy allocator from i915 into common drm")
>
> Also, please add:
>
> Cc: stable@vger.kernel.org
>
>> Cc: Joel Fernandes <joelagnelf@nvidia.com>
>> Cc: Dave Airlie <airlied@redhat.com>
>> Cc: intel-xe@lists.freedesktop.org
>> Cc: Peter Senna Tschudin <peter.senna@linux.intel.com>
>> Cc: Matthew Auld <matthew.auld@intel.com>
>> Signed-off-by: Koen Koning <koen.koning@linux.intel.com>
>
> [1] https://lore.kernel.org/all/DGIUUFLC31D5.2OZBF5FWQJWMZ@kernel.org/
next prev parent reply other threads:[~2026-02-19 10:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=318f1dcc-bc95-473e-bdb3-7ea03708395c@intel.com \
--to=matthew.auld@intel.com \
--cc=airlied@redhat.com \
--cc=dakr@kernel.org \
--cc=dri-devel-bounces@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=joelagnelf@nvidia.com \
--cc=koen.koning@linux.intel.com \
--cc=peter.senna@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox