On Mon, 15 Jun 2009 15:39:55 -0500 "Mike Miller (OS Dev)" <mikem@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > I'm getting reports that the driver hangs in the scan thread during rmmod. I > call kthread_stop in cciss_remove_one. Do I also neesd to call complete()? Yep. static int scan_thread(void *data) { ctlr_info_t *h = data; int rc; DECLARE_COMPLETION_ONSTACK(wait); h->rescan_wait = &wait; for (;;) { rc = wait_for_completion_interruptible(&wait); if (kthread_should_stop()) break; if (!rc) rebuild_lun_table(h, 0); } return 0; } Two things will cause that wait_for_completion_interruptible() to return: a complete() and a signal_pending(). But this is a kernel thread, and kernel threads start out with all signals blocked. > During my testing everything seemed to working OK. That's odd. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html