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

Commit 83ceb67d authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 64ba3dc3
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -1108,7 +1108,6 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512)
		charmap += 4 * cmapsz;
		charmap += 4 * cmapsz;
#endif
#endif


	tty_unlock();
	spin_lock_irq(&vga_lock);
	spin_lock_irq(&vga_lock);
	/* First, the Sequencer */
	/* First, the Sequencer */
	vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x1);
	vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x1);
@@ -1192,7 +1191,6 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512)
		vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0);	
		vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0);	
	}
	}
	spin_unlock_irq(&vga_lock);
	spin_unlock_irq(&vga_lock);
	tty_lock();
	return 0;
	return 0;
}
}