From: Peter Zijlstra Date: Wed, 24 Sep 2014 08:18:51 +0000 (+0200) Subject: sched, tty: Deal with nested sleeps X-Git-Tag: omap-for-v3.19/fixes-rc1~165^2~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97d9e28d1a27b84a6a0b155f2390289afa279341;p=pandora-kernel.git sched, tty: Deal with nested sleeps 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. 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. Signed-off-by: Peter Zijlstra (Intel) Acked-by: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Linus Torvalds Cc: tglx@linutronix.de Cc: ilya.dryomov@inktank.com Cc: umgwanakikbuti@gmail.com Cc: oleg@redhat.com Link: http://lkml.kernel.org/r/20140924082242.323011233@infradead.org Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed