mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/6] fbdev: fixup callers which ignore errors from fb_deferred_io_init()
@ 2026-09-26 13:16 Lorenzo Stoakes (ARM)
  2026-09-26 13:16 ` [PATCH 1/6] fbdev: ssd1307fb: check for fb_deferred_io_init() error Lorenzo Stoakes (ARM)
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-09-26 13:16 UTC (permalink / raw)
  To: Helge Deller, Javier Martinez Canillas, Thomas Zimmermann,
	Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
	Bernie Thompson, Greg Kroah-Hartman, Steve Glendinning,
	Florian Tobias Schandinat
  Cc: linux-fbdev, dri-devel, linux-kernel, linux-input,
	Steve Glendinning, Lorenzo Stoakes (ARM),
	stable

Commit 56c134f7f1b5 ("fbdev: Track deferred-I/O pages in pageref struct")
converted fb_deferred_io_init() from a void function to one returning an
error value.

However a number of callers don't seem to have been apprised of the fact
and continue to treat it like a void function.

This is problematic, as upon allocation failure, struct
fb_info->fbdefio_state is NULL.

That means when a subsequent operation is performed upon the driver, for
instance opening the file, a NULL pointer dereference occurs.

Update all of the remaining drivers which fail to check this to do so.

This issue was discovered as part of a separate series which updated logic
belonging to ssd1307fb.

Also fix up a separate issue with a BUG_ON() occurring on allocation
failure for udlfb and smcufx.

Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
---
Lorenzo Stoakes (ARM) (6):
      fbdev: ssd1307fb: check for fb_deferred_io_init() error
      fbdev: xen-fbfront: check for fb_deferred_io_init() error
      HID: picoLCD: check for fb_deferred_io_init() error
      fbdev: udlfb: check for fb_deferred_io_init() error
      fbdev: smscufx: check for fb_deferred_io_init() error
      fbdev: sh_mobile_lcdc: check for fb_deferred_io_init() error

 drivers/hid/hid-picolcd_fb.c           | 12 +++++++++---
 drivers/video/fbdev/sh_mobile_lcdcfb.c |  6 +++++-
 drivers/video/fbdev/smscufx.c          |  9 ++++++---
 drivers/video/fbdev/ssd1307fb.c        |  6 +++++-
 drivers/video/fbdev/udlfb.c            |  9 ++++++---
 drivers/video/fbdev/xen-fbfront.c      |  7 ++++++-
 6 files changed, 37 insertions(+), 12 deletions(-)
---
base-commit: 6812ce4e4379ffc99c52401ec28f0d7ffbc36206
change-id: 20260926-fix-fbdefio-error-handling-ab135b0193cb

Best regards,
-- 
Lorenzo Stoakes (ARM) <ljs@kernel.org>


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

end of thread, other threads:[~2026-09-26 13:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-26 13:16 [PATCH 0/6] fbdev: fixup callers which ignore errors from fb_deferred_io_init() Lorenzo Stoakes (ARM)
2026-09-26 13:16 ` [PATCH 1/6] fbdev: ssd1307fb: check for fb_deferred_io_init() error Lorenzo Stoakes (ARM)
2026-09-26 13:17 ` [PATCH 2/6] fbdev: xen-fbfront: " Lorenzo Stoakes (ARM)
2026-09-26 13:17 ` [PATCH 3/6] HID: picoLCD: " Lorenzo Stoakes (ARM)
2026-09-26 13:17 ` [PATCH 4/6] fbdev: udlfb: " Lorenzo Stoakes (ARM)
2026-09-26 13:17 ` [PATCH 5/6] fbdev: smscufx: " Lorenzo Stoakes (ARM)
2026-09-26 13:17 ` [PATCH 6/6] fbdev: sh_mobile_lcdc: " Lorenzo Stoakes (ARM)

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

all inboxes | Powered by JetHome®