vt: make the console_lock ordering explicit for three variables
Get series with b4
b4 am [email protected] change-id 20260921-mb-vt-ca00f48031f0Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | vt: order the fg_console switch against vt_console_print()drivers/ | +4 | 1 reply | |
| 2/3 | vt: order console_blanked between blanking and unblankingdrivers/ | +8 | 0 replies | |
| 3/3 | vt: order the vc_cons[] clear against console_callback()drivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] vt: make the console_lock ordering explicit for three variables
Three variables in vt.c are written on one path and read on another with plain accesses on both sides: fg_console between redraw_screen() and vt_console_print(), console_blanked between do_blank_screen() and do_unblank_screen(), and the vc_cons[] slot between vc_deallocate() and console_callback().
Every one of these pairs is serialised by console_lock today, so no behaviour changes. The patches state the publication order in the accessors rather than leaving it implicit in the lock, so the dependency is visible where the variables are used.
Found with MBCheck, a static herd7-based memory consistency checker. Compile-tested on arm64 with W=1, no new warnings.
---
Jaidev Shastri (3):
vt: order the fg_console switch against vt_console_print()
vt: order console_blanked between blanking and unblanking
vt: order the vc_cons[] clear against console_callback()
drivers/tty/vt/vt.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
---
base-commit: 93f51579e7df248780214094418f205253383cc5
change-id: 20260921-mb-vt-ca00f48031f0
Best regards,
Signature · 1 line
Jaidev Shastri <[email protected]>