Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 214b0dd5 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

dummycon: Sprinkle locking checks



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

Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-2-daniel.vetter@ffwll.ch
parent d1fdb6d8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);
}