Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: fix console_sem lock order

vgacon_do_font_op releases and reacquires the BTM while holding
console_sem. This violates the rule that BTM has to be the
outer lock whenever we hold both.

There does not seem to be any reason to give up the BTM here,
so just stop doing that.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Arnd Bergmann and committed by
Greg Kroah-Hartman
83ceb67d 64ba3dc3

-2
-2
drivers/video/console/vgacon.c
··· 1108 1108 charmap += 4 * cmapsz; 1109 1109 #endif 1110 1110 1111 - tty_unlock(); 1112 1111 spin_lock_irq(&vga_lock); 1113 1112 /* First, the Sequencer */ 1114 1113 vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x1); ··· 1191 1192 vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0); 1192 1193 } 1193 1194 spin_unlock_irq(&vga_lock); 1194 - tty_lock(); 1195 1195 return 0; 1196 1196 } 1197 1197