[PATCH] Kernel zombie threads after module removal.

Christian Gennerat (xgen@free.fr)
Wed, 29 May 2002 23:11:47 +0200


John Levon wrote:

>>This is very close to the problem related in
>>http://lkml.org/archive/2002/2/4/368/index.html
>>but I have no USB. I have SCSI with aha152x_cs.o,
>>and after doing "cardctl eject" that removes the module,
>>the process scsi_eh_0 stays as zombie.
>>
>
>Add
>
> reparent_to_init();
>
>after the call to daemonize() in scsi_error_handler() in
>drivers/scsi/scsi_error.c
>
>Disclaimer: I don't know this code at all
>
Good.

diff -Bbu /src/linux/drivers/scsi/scsi_error.c.orig /src/linux/drivers/scsi/scsi_error.c
--- scsi_error.c.orig Sun Sep 9 17:52:35 2001
+++ scsi_error.c Wed May 29 22:41:32 2002
@@ -1860,6 +1860,7 @@
*/

daemonize();
+ reparent_to_init();

/*
* Set the name of this process.

>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/