Date: Sat, 10 Feb 2007 22:06:18 +0100 (CET) From: Stefan Richter Subject: ieee1394: fix another deadlock in nodemgr A "modprobe ohci1394; sleep 1.5; modprobe -r ohci1394" could get stuck in uninterruptible state, especially if an external node was connected. http://bugzilla.kernel.org/show_bug.cgi?id=7792 Signed-off-by: Stefan Richter Index: linux/drivers/ieee1394/nodemgr.c =================================================================== --- linux.orig/drivers/ieee1394/nodemgr.c 2007-02-06 21:55:36.000000000 +0100 +++ linux/drivers/ieee1394/nodemgr.c 2007-02-10 21:17:43.000000000 +0100 @@ -1681,7 +1681,8 @@ static int nodemgr_host_thread(void *__h for (;;) { /* Sleep until next bus reset */ set_current_state(TASK_INTERRUPTIBLE); - if (get_hpsb_generation(host) == generation) + if (get_hpsb_generation(host) == generation && + !kthread_should_stop()) schedule(); __set_current_state(TASK_RUNNING);