Skip to content

Commit 2d9ef94

Browse files
committed
Revert "printk: extend console_lock for per-console locking"
This reverts commit 8e27473. The testing of 5.19 release candidates revealed missing synchronization between early and regular console functionality. It would be possible to start the console kthreads later as a workaround. But it is clear that console lock serialized console drivers between each other. It opens a big area of possible problems that were not considered by people involved in the development and review. printk() is crucial for debugging kernel issues and console output is very important part of it. The number of consoles is huge and a proper review would take some time. As a result it need to be reverted for 5.19. Link: https://lore.kernel.org/r/YrBdjVwBOVgLfHyb@alley Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20220623145157.21938-5-pmladek@suse.com
1 parent 007eeab commit 2d9ef94

File tree

2 files changed

+56
-220
lines changed

2 files changed

+56
-220
lines changed

include/linux/console.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include <linux/atomic.h>
1818
#include <linux/types.h>
19-
#include <linux/mutex.h>
2019

2120
struct vc_data;
2221
struct console_font_op;
@@ -155,20 +154,6 @@ struct console {
155154
u64 seq;
156155
unsigned long dropped;
157156
struct task_struct *thread;
158-
bool blocked;
159-
160-
/*
161-
* The per-console lock is used by printing kthreads to synchronize
162-
* this console with callers of console_lock(). This is necessary in
163-
* order to allow printing kthreads to run in parallel to each other,
164-
* while each safely accessing the @blocked field and synchronizing
165-
* against direct printing via console_lock/console_unlock.
166-
*
167-
* Note: For synchronizing against direct printing via
168-
* console_trylock/console_unlock, see the static global
169-
* variable @console_kthreads_active.
170-
*/
171-
struct mutex lock;
172157

173158
void *data;
174159
struct console *next;

0 commit comments

Comments
 (0)