On Mon, Aug 04, 2014 at 12:30:30PM +0200, Peter Zijlstra wrote:
> n_tty_{read,write} are wait loops with sleeps in. Wait loops rely on
> task_struct::state and sleeps do too, since that's the only means of
> actually sleeping. Therefore the nested sleeps destroy the wait loop
> state and the wait loop breaks the sleep functions that assume
> TASK_RUNNING (mutex_lock).
>
> Fix this by using the new woken_wake_function and wait_woken() stuff,
> which registers wakeups in wait and thereby allows shrinking the
> task_state::state changes to the actual sleep part.
>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Jiri Slaby <[email protected]>
> Signed-off-by: Peter Zijlstra <[email protected]>
> ---
> drivers/tty/n_tty.c | 17 +++++------------
> 1 file changed, 5 insertions(+), 12 deletions(-)
>
Acked-by: Greg Kroah-Hartman <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/