Bug 193321 - VT_RELDISP race
Summary: VT_RELDISP race
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Console/Framebuffers (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: James Simmons
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-26 18:14 UTC by Stas Sergeev
Modified: 2017-01-26 19:25 UTC (History)
0 users

See Also:
Kernel Version: any (4.7.0 for example)
Subsystem:
Regression: No
Bisected commit-id:


Attachments
test case (2.79 KB, text/x-csrc)
2017-01-26 18:14 UTC, Stas Sergeev
Details

Description Stas Sergeev 2017-01-26 18:14:45 UTC
Created attachment 253221 [details]
test case

Hi.

Attached test-case demonstrates the problem.
Compile it and run under vc (can be KMS or text console).
It will print the keypresses, and the console switching
will work normally.

Then edit the source and change the SHOW_BUG macro to 1.
It removes the small sleep between VT_ACTIVATE and VT_RELDISP.
Recompile it and run again. But beware: your console will
lock up without any ability to recover it (SAK helps though).

The problem is that VT_ACTIVATE only does schedule_work(),
and if your code does VT_RELDISP quickly, it all hangs.
Comment 1 Stas Sergeev 2017-01-26 19:25:30 UTC
Forgot to mention: use 'esc' key to exit the
test-case. There is no other way to stop it.

Note You need to log in before you can comment on or make changes to this bug.