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

Commit 6af9a43d authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds
Browse files

tty: fix tty_port_block_til_ready waiting



Since commit 3e3b5c08 ("tty: use
prepare/finish_wait"), tty_port_block_til_ready() is using
prepare_to_wait()/finish_wait().  Those functions require that the
wait_queue_t be initialised with .func=autoremove_wake_function, via
DEFINE_WAIT().

But the conversion from DECLARE_WAITQUEUE() to DEFINE_WAIT() was not made,
so this code will oops in finish_wait().

Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 24ed3aba
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -193,7 +193,7 @@ int tty_port_block_til_ready(struct tty_port *port,
{
{
	int do_clocal = 0, retval;
	int do_clocal = 0, retval;
	unsigned long flags;
	unsigned long flags;
	DECLARE_WAITQUEUE(wait, current);
	DEFINE_WAIT(wait);
	int cd;
	int cd;


	/* block if port is in the process of being closed */
	/* block if port is in the process of being closed */