Skip to content

Commit 3bd3a0e

Browse files
jwrdegoedebzolnier
authored andcommitted
fbcon: Call WARN_CONSOLE_UNLOCKED() where applicable
Replace comments about places where the console lock should be held with calls to WARN_CONSOLE_UNLOCKED() to assert that it is actually held. Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
1 parent d48de54 commit 3bd3a0e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/video/fbdev/core/fbcon.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,8 @@ static int set_con2fb_map(int unit, int newidx, int user)
828828
struct fb_info *oldinfo = NULL;
829829
int found, err = 0;
830830

831+
WARN_CONSOLE_UNLOCKED();
832+
831833
if (oldidx == newidx)
832834
return 0;
833835

@@ -3044,6 +3046,8 @@ static int fbcon_fb_unbind(int idx)
30443046
{
30453047
int i, new_idx = -1, ret = 0;
30463048

3049+
WARN_CONSOLE_UNLOCKED();
3050+
30473051
if (!fbcon_has_console_bind)
30483052
return 0;
30493053

@@ -3094,6 +3098,8 @@ static int fbcon_fb_unregistered(struct fb_info *info)
30943098
{
30953099
int i, idx;
30963100

3101+
WARN_CONSOLE_UNLOCKED();
3102+
30973103
idx = info->node;
30983104
for (i = first_fb_vc; i <= last_fb_vc; i++) {
30993105
if (con2fb_map[i] == idx)
@@ -3131,6 +3137,9 @@ static int fbcon_fb_unregistered(struct fb_info *info)
31313137
static void fbcon_remap_all(int idx)
31323138
{
31333139
int i;
3140+
3141+
WARN_CONSOLE_UNLOCKED();
3142+
31343143
for (i = first_fb_vc; i <= last_fb_vc; i++)
31353144
set_con2fb_map(i, idx, 0);
31363145

@@ -3177,6 +3186,8 @@ static int fbcon_fb_registered(struct fb_info *info)
31773186
{
31783187
int ret = 0, i, idx;
31793188

3189+
WARN_CONSOLE_UNLOCKED();
3190+
31803191
idx = info->node;
31813192
fbcon_select_primary(info);
31823193

0 commit comments

Comments
 (0)