From 777c6599a5f574ca3ea74a4148b80b8918546850 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 24 Jun 2009 18:35:05 +0100 Subject: [PATCH] tty: fix tty_port_block_til_ready waiting Since commit 1f62c109f31f2f6165ecad0c7b3d72b34166c7a2 ("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: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- drivers/char/tty_port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c index 62dadfc95e341..4e862a75f7ff2 100644 --- a/drivers/char/tty_port.c +++ b/drivers/char/tty_port.c @@ -193,7 +193,7 @@ int tty_port_block_til_ready(struct tty_port *port, { int do_clocal = 0, retval; unsigned long flags; - DECLARE_WAITQUEUE(wait, current); + DEFINE_WAIT(wait); int cd; /* block if port is in the process of being closed */ -- 2.39.5