All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fbdev: fix udlfb shadow buffer and framebuffer registration
@ 2026-12-04  9:35 YuanZhe Liu
  2026-12-04 16:08 ` [PATCH v2 1/2] fbdev: udlfb: fix shadow buffer handling when the framebuffer grows YuanZhe Liu
  0 siblings, 1 reply; 5+ messages in thread
From: YuanZhe Liu @ 2026-12-04  9:35 UTC (permalink / raw)
  To: Bernie Thompson, Simona Vetter
  Cc: Helge Deller, Thomas Zimmermann, linux-fbdev, dri-devel,
	linux-kernel, stable, Bin Yu, Cheng Wen

This series fixes two independent problems in the fbdev paths used by
the udlfb driver. Both were found while analyzing failures observed on
a DisplayLink USB adapter; the changes are compile-tested only and no
hardware testing was performed.

Patch 1 fixes an out-of-bounds read when the framebuffer is switched to
a larger mode while the shadow buffer is disabled or its allocation
fails. The driver kept the previous, smaller shadow buffer and
dlfb_render_hline() used it to compare lines of the larger framebuffer.

Patch 2 fixes framebuffer registration reporting a failure after the
framebuffer has already been registered. A failed console takeover is
not fatal for the framebuffer itself, but drivers treated the error as
fatal, freed the live fb_info and left a dangling entry in
registered_fb[]; the next open then dereferenced freed memory.

Changes in v2:
  - Patch 1: publish the new buffers and geometry under
    dlfb->render_mutex, free the stale shadow buffer directly, and
    validate damage requests against the installed framebuffer.
    Patch 2 is unchanged.

Based on v7.3.5.

YuanZhe Liu (2):
  fbdev: udlfb: fix shadow buffer handling when the framebuffer grows
  fbdev: fbmem: don't fail registration when fbcon cannot take over

 drivers/video/fbdev/core/fbmem.c |  8 +++++-
 drivers/video/fbdev/udlfb.c      | 45 +++++++++++++++++++++++++-------
 2 files changed, 43 insertions(+), 10 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-12-04 16:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  9:35 [PATCH v2 0/2] fbdev: fix udlfb shadow buffer and framebuffer registration YuanZhe Liu
2026-12-04 16:08 ` [PATCH v2 1/2] fbdev: udlfb: fix shadow buffer handling when the framebuffer grows YuanZhe Liu
2026-12-04 16:08   ` [PATCH v2 2/2] fbdev: fbmem: don't fail registration when fbcon cannot take over YuanZhe Liu
2026-12-04 16:44     ` sashiko-bot
2026-12-04 16:28   ` [PATCH v2 1/2] fbdev: udlfb: fix shadow buffer handling when the framebuffer grows sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.