Skip to content

fbcon: Fix segfault on re-orientation

Thomas Zimmermann dri-devel linux-fbdev sashiko-reviews 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fbcon: Don't change shared blitting state for hidden consolesdrivers/video/fbdev/core/fbcon.c+28 -100 replies
2/2fbcon: Provide a single implementation of fbcon_set_rotation()drivers/video/fbdev/core/fbcon.c+7 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] fbcon: Fix segfault on re-orientation

fbcon_init() re-rotates the console even when initializing a hidden console. The rotated console then accesses its screen buffer with regular bit ops. This results in a segmentation fault. Fix this by resetting rotation only on new and visible consoles.

The problem can be reproduced by rotating the console on bochs and shutting down the system. When plymouth opens the terminal, it triggers the crash.

Patch 1 fixes the bug. I used an LLM to debug the issue and create the fix. This goes first to simplify backporting.

Patch 2 slightly refactors the fix.

Thomas Zimmermann (2):
fbcon: Don't change shared blitting state for hidden consoles
fbcon: Provide a single implementation of fbcon_set_rotation()

 drivers/video/fbdev/core/fbcon.c | 43 ++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 16 deletions(-)
Signature · 1 line
2.56.1