On Friday 20 April 2001 00:49, J . A . Magallon wrote:
> Hi,
>
> Just built 2.4.3-ac10 and got an oops when booting. It tries to detect
> the CD and gives the oops.
> >>EIP; c01bfc7c <cdrom_get_entry+1c/50> <=====
This appears to be a known problem. Jens Axboe sent a patch in a different
thread ("SD-W2002 DVD-RAM") that fixes this. I am including it
here for your convenience. (The patch is against 2.4.4-pre4 + Jens'
latest fixes.)
Stefan
--- drivers/cdrom/cdrom.c~ Thu Apr 19 13:44:46 2001
+++ drivers/cdrom/cdrom.c Thu Apr 19 13:45:33 2001
@@ -350,6 +350,12 @@
{
int i, nr, foo;
+ if (!cdrom_numbers) {
+ int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
+ cdrom_numbers = kmalloc(n_entries * sizeof(unsigned long), GFP_KERNEL);
+ memset(cdrom_numbers, 0, n_entries * sizeof(unsigned long));
+ }
+
nr = 0;
foo = -1;
for (i = 0; i < CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8); i++) {
@@ -2696,10 +2702,6 @@
static int __init cdrom_init(void)
{
- int n_entries = CDROM_MAX_CDROMS / (sizeof(unsigned long) * 8);
-
- cdrom_numbers = kmalloc(n_entries * sizeof(unsigned long), GFP_KERNEL);
-
#ifdef CONFIG_SYSCTL
cdrom_sysctl_register();
#endif