[Intel-gfx] [PATCH 01/33] dummycon: Sprinkle locking checks

Daniel Vetter daniel.vetter at ffwll.ch
Tue May 28 09:02:32 UTC 2019


As part of trying to understand the locking (or lack thereof) in the
fbcon/vt/fbdev maze, annotate everything.

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Reviewed-by: Sam Ravnborg <sam at ravnborg.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie at samsung.com>
Cc: Hans de Goede <hdegoede at redhat.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: Kees Cook <keescook at chromium.org>
Cc: Nicolas Pitre <nicolas.pitre at linaro.org>
---
 drivers/video/console/dummycon.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
index ff886e99104b..2a0d0bda7faa 100644
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -34,6 +34,8 @@ static bool dummycon_putc_called;
 
 void dummycon_register_output_notifier(struct notifier_block *nb)
 {
+	WARN_CONSOLE_UNLOCKED();
+
 	raw_notifier_chain_register(&dummycon_output_nh, nb);
 
 	if (dummycon_putc_called)
@@ -42,11 +44,15 @@ void dummycon_register_output_notifier(struct notifier_block *nb)
 
 void dummycon_unregister_output_notifier(struct notifier_block *nb)
 {
+	WARN_CONSOLE_UNLOCKED();
+
 	raw_notifier_chain_unregister(&dummycon_output_nh, nb);
 }
 
 static void dummycon_putc(struct vc_data *vc, int c, int ypos, int xpos)
 {
+	WARN_CONSOLE_UNLOCKED();
+
 	dummycon_putc_called = true;
 	raw_notifier_call_chain(&dummycon_output_nh, 0, NULL);
 }
-- 
2.20.1



More information about the Intel-gfx mailing list