|
|
838818e |
From 3bd3a0e330aae4fffa8028aba2407ef615ab040b Mon Sep 17 00:00:00 2001
|
|
|
838818e |
From: Hans de Goede <hdegoede@redhat.com>
|
|
|
838818e |
Date: Thu, 28 Jun 2018 15:20:28 +0200
|
|
|
838818e |
Subject: [PATCH 3/7] fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable
|
|
|
838818e |
|
|
|
838818e |
Replace comments about places where the console lock should be held with
|
|
|
838818e |
calls to WARN_CONSOLE_UNLOCKED() to assert that it is actually held.
|
|
|
838818e |
|
|
|
838818e |
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
|
|
838818e |
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
|
838818e |
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
|
|
838818e |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
838818e |
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
|
|
|
838818e |
---
|
|
|
838818e |
drivers/video/fbdev/core/fbcon.c | 11 +++++++++++
|
|
|
838818e |
1 file changed, 11 insertions(+)
|
|
|
838818e |
|
|
|
838818e |
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
|
|
|
838818e |
index c910e74d46ff..cd8d52a967aa 100644
|
|
|
838818e |
--- a/drivers/video/fbdev/core/fbcon.c
|
|
|
838818e |
+++ b/drivers/video/fbdev/core/fbcon.c
|
|
|
838818e |
@@ -828,6 +828,8 @@ static int set_con2fb_map(int unit, int newidx, int user)
|
|
|
838818e |
struct fb_info *oldinfo = NULL;
|
|
|
838818e |
int found, err = 0;
|
|
|
838818e |
|
|
|
838818e |
+ WARN_CONSOLE_UNLOCKED();
|
|
|
838818e |
+
|
|
|
838818e |
if (oldidx == newidx)
|
|
|
838818e |
return 0;
|
|
|
838818e |
|
|
|
838818e |
@@ -3044,6 +3046,8 @@ static int fbcon_fb_unbind(int idx)
|
|
|
838818e |
{
|
|
|
838818e |
int i, new_idx = -1, ret = 0;
|
|
|
838818e |
|
|
|
838818e |
+ WARN_CONSOLE_UNLOCKED();
|
|
|
838818e |
+
|
|
|
838818e |
if (!fbcon_has_console_bind)
|
|
|
838818e |
return 0;
|
|
|
838818e |
|
|
|
838818e |
@@ -3094,6 +3098,8 @@ static int fbcon_fb_unregistered(struct fb_info *info)
|
|
|
838818e |
{
|
|
|
838818e |
int i, idx;
|
|
|
838818e |
|
|
|
838818e |
+ WARN_CONSOLE_UNLOCKED();
|
|
|
838818e |
+
|
|
|
838818e |
idx = info->node;
|
|
|
838818e |
for (i = first_fb_vc; i <= last_fb_vc; i++) {
|
|
|
838818e |
if (con2fb_map[i] == idx)
|
|
|
838818e |
@@ -3131,6 +3137,9 @@ static int fbcon_fb_unregistered(struct fb_info *info)
|
|
|
838818e |
static void fbcon_remap_all(int idx)
|
|
|
838818e |
{
|
|
|
838818e |
int i;
|
|
|
838818e |
+
|
|
|
838818e |
+ WARN_CONSOLE_UNLOCKED();
|
|
|
838818e |
+
|
|
|
838818e |
for (i = first_fb_vc; i <= last_fb_vc; i++)
|
|
|
838818e |
set_con2fb_map(i, idx, 0);
|
|
|
838818e |
|
|
|
838818e |
@@ -3177,6 +3186,8 @@ static int fbcon_fb_registered(struct fb_info *info)
|
|
|
838818e |
{
|
|
|
838818e |
int ret = 0, i, idx;
|
|
|
838818e |
|
|
|
838818e |
+ WARN_CONSOLE_UNLOCKED();
|
|
|
838818e |
+
|
|
|
838818e |
idx = info->node;
|
|
|
838818e |
fbcon_select_primary(info);
|
|
|
838818e |
|
|
|
838818e |
--
|
|
|
838818e |
2.18.0
|
|
|
838818e |
|