From: Andi Shyti <andi.shyti@kernel.org>
To: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Cc: dri-devel@lists.freedesktop.org,
maarten.lankhorst@linux.intel.com, andi.shyti@linux.intel.com,
krzysztof.karas@intel.com, krzysztof.niemiec@intel.com,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/fb-helper: guard against NULL fb_helper->funcs in restore path
Date: Thu, 23 Jul 2026 11:27:51 +0200 [thread overview]
Message-ID: <amHed5UASdD_3Foc@zenone.zhora.eu> (raw)
In-Reply-To: <e1957da52fcdd1d88a285553d36e12a0362a8258.1784196681.git.sebastian.brzezinka@intel.com>
Hi Sebastian,
On Thu, Jul 16, 2026 at 12:14:33PM +0200, Sebastian Brzezinka wrote:
> When a driver's fbdev probe callback fails before assigning
> fb_helper->funcs (e.g. i915's intel_fbdev_driver_fbdev_probe() bailing
> out early on a DMA/GGTT pin failure), the fbdev client stays registered
> with fb_helper->funcs == NULL. Any later restore, such as on drm fd close
> via drm_client_dev_restore() -> drm_fbdev_client_restore(), reaches
> __drm_fb_helper_restore_fbdev_mode_unlocked() and unconditionally
> dereferences fb_helper->funcs->fb_restore, causing a NULL pointer
> dereference.
>
> Guard the fb_restore call with a NULL check on fb_helper->funcs.
>
> Fixes: 2ef5754c9649 ("drm/i915/display: fbdev: Move custom restore code to new callback")
> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Thanks,
Andi
prev parent reply other threads:[~2026-07-23 9:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 10:14 [PATCH] drm/fb-helper: guard against NULL fb_helper->funcs in restore path Sebastian Brzezinka
2026-07-16 11:13 ` ✓ i915.CI.BAT: success for " Patchwork
2026-07-16 16:07 ` ✗ i915.CI.Full: failure " Patchwork
2026-07-20 7:35 ` [PATCH] " Krzysztof Karas
2026-07-20 19:33 ` ✓ i915.CI.BAT: success for drm/fb-helper: guard against NULL fb_helper->funcs in restore path (rev2) Patchwork
2026-07-21 2:28 ` ✓ i915.CI.Full: " Patchwork
2026-07-23 9:27 ` Andi Shyti [this message]
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=amHed5UASdD_3Foc@zenone.zhora.eu \
--to=andi.shyti@kernel.org \
--cc=andi.shyti@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=krzysztof.karas@intel.com \
--cc=krzysztof.niemiec@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=sebastian.brzezinka@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