> This oops happens when I run "rmmod cdrom" on a 2.4.4-ac4 kernel with
> CONFIG_SYSCTL enabled. It doesn't happen if CONFIG_SYSCTL is disabled.
> 
> sr_mod isn't loaded at this point. Reference to sd_mod looks weird. After
> this oops the "cdrom" module remains in memory in the "deleted" state.

> Unable to handle kernel NULL pointer dereference at virtual address 00000008
[...]
> >>EIP; c0118051 <unregister_sysctl_table+5/2c>   <=====

The following patch fixes unloading of cdrom module when no cdrom driver
loaded (2.4.5-pre, 2.4.4-ac):

--- drivers/cdrom/cdrom.c.old   Fri May  4 22:44:31 2001
+++ drivers/cdrom/cdrom.c       Fri May  4 22:54:36 2001
@@ -2698,7 +2698,8 @@
 
 static void cdrom_sysctl_unregister(void)
 {
-       unregister_sysctl_table(cdrom_sysctl_header);
+       if (cdrom_sysctl_header)
+               unregister_sysctl_table(cdrom_sysctl_header);
 }
 
 #endif /* CONFIG_SYSCTL */


Andrzej


-- 
=======================================================================
  Andrzej M. Krzysztofowicz               [EMAIL PROTECTED]
  tel.  (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
-
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/

Reply via email to