ac10 ide-cd oopses on boot
Hi,
Just built 2.4.3-ac10 and got an oops when booting. It tries to detect the CD and gives the oops.
Here follows the oops both raw and decoded:
Unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip:
c01bfc7c
pgd entry c0101000: 0000000000000000
pmd entry c0101000: 0000000000000000
.. pmd not present!
Oops: 0000
CPU: 1
EIP: 0010:[<c01bfc7c>]
EFLAGS: 00010297
eax: 0000000d ebx: ffffffff ecx: 00000000 eax: 00000000
esi: 00000000 edi: c15d84e8 ebp: c019e790 esp: c15f9ee8
ds: 0018 es: 0018 ss: 0018
Process swapper (pid: 1, stackpage=c15f9000)
Stack: c0248fbc 00000000 c01bfeac 00000001 c0239e04 c0289841 00000246 00000001
c02cdfb0 c0118af8 c02cdfb0 c0220524 00000080 c019f356 c021ff4c 00000001
00701600 00000000 0007122a 03297371 ff00c023 00008000 c15d84e8
c02cdfb0
Call Trace: [<c01bfeac>] [<c0118af8>] [<c019f356>] [<ff00c023>]
[<c019f903>] [<c019fc66>] [<c0105000>]
[<c0105028>] [<c0105000>] [<c0105516>] [<c0105000>]
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00
<0>Kernel panic: Attempted to kill initksymoops 2.4.1 on i686 2.4.3-ac9. Options used
-v /usr/src/linux-2.4.3-ac10/vmlinux (specified)
-K (specified)
-L (specified)
-o /lib/modules/2.4.3-ac9/ (default)
-m /boot/System.map-2.4.3-ac10 (specified)No modules in ksyms, skipping objects
Unable to handle kernel NULL pointer dereference at virtual address 00000000 c01bfc7c Oops: 0000 CPU: 1 EIP: 0010:[<c01bfc7c>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010297
eax: 0000000d ebx: ffffffff ecx: 00000000 eax: 00000000
esi: 00000000 edi: c15d84e8 ebp: c019e790 esp: c15f9ee8
ds: 0018 es: 0018 ss: 0018
Process swapper (pid: 1, stackpage=c15f9000)
Stack: c0248fbc 00000000 c01bfeac 00000001 c0239e04 c0289841 00000246 00000001
c02cdfb0 c0118af8 c02cdfb0 c0220524 00000080 c019f356 c021ff4c 00000001
00701600 00000000 0007122a 03297371 ff00c023 00008000 c15d84e8
c02cdfb0
Call Trace: [<c01bfeac>] [<c0118af8>] [<c019f356>] [<ff00c023>]
[<c019f903>] [<c019fc66>] [<c0105000>]
[<c0105028>] [<c0105000>] [<c0105516>] [<c0105000>]
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00Quoted 1 line
Quoted 1 line
EIP;
c01bfc7c<cdrom_get_entry+1c/50> <=====
Trace; c01bfeac <register_cdrom+1dc/280> Trace; c0118af8 <printk+148/160>
Trace; c019f356 <ide_cdrom_probe_capabilities+3b6/3d0> Trace; ff00c023 <END_OF_CODE+3ed31eb3/????> Trace; c019f903 <ide_cdrom_setup+4a3/4e0> Trace; c019fc66 <ide_cdrom_init+e6/180> Trace; c0105000 <init+0/170>
Trace; c0105028 <init+28/170>
Trace; c0105000 <init+0/170>
Trace; c0105516 <kernel_thread+26/30>
Trace; c0105000 <init+0/170>
Code; c01bfc7c <cdrom_get_entry+1c/50> 00000000 <_EIP>:
Code; c01bfc7c <cdrom_get_entry+1c/50> <=====
0: 8b 04 8a mov (%edx,%ecx,4),%eax <=====
Code; c01bfc7f <cdrom_get_entry+1f/50>
3: 83 f8 ff cmp $0xffffffff,%eax
Code; c01bfc82 <cdrom_get_entry+22/50>
6: 75 0c jne 14 <_EIP+0x14> c01bfc90
<cdrom_get_entry+30/50>
Code; c01bfc84 <cdrom_get_entry+24/50>
8: 83 c6 20 add $0x20,%esi
Code; c01bfc87 <cdrom_get_entry+27/50>
b: eb e7 jmp fffffff4 <_EIP+0xfffffff4> c01bfc70
<cdrom_get_entry+10/50>
Code; c01bfc89 <cdrom_get_entry+29/50>
d: 8d b4 26 00 00 00 00 lea 0x0(%esi,1),%esi
<0>Kernel panic: Attempted to kill init
Signature · 4 lines
J.A. Magallon # Let the source mailto:[email protected] # be with you, Luke... Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686
Quoted 2 lines
Just built 2.4.3-ac10 and got an oops when booting. It tries to detect the CD and gives the oops.
Can you back out the ide-cd changes Jens did and see if that fixes it ?
Quoted 3 lines · Alan Cox
Quoted 3 lines
Just built 2.4.3-ac10 and got an oops when booting. It tries to detect the CD and gives the oops.
I'm getting a similar oops with -ac10. I initially thought this might be a result of switching to gcc-2.95.3, because -ac9 runs fine when built with gcc-2.95.2, but if others have seen this too, it's probably the cdrom code indeed.
Quoted 1 line
Can you back out the ide-cd changes Jens did and see if that fixes it ?
I'll try that tomorrow, too.
Regards,
Udo.
--
ksymoops 2.3.7 on i686 2.4.3-ac9. Options used
-v /usr/src/linux/vmlinux (specified)
-K (specified)
-l /proc/modules (default)
-o /lib/modules/2.4.3-ac10 (specified)
-m /boot/System.map-2.4.3-ac10 (specified)
No modules in ksyms, skipping objects
No ksyms, skipping lsmod
Unable to handle kernel NULL pointer dereference at virtual address 00000000 Oops: 0000 CPU: 0
EIP: 0010:[<c01b9bac>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010297
eax: 0000000d ebx: ffffffff ecx: 00000000 edx: 00000000
esi: 00000000 edi: c1469ae8 ebp: 00000021 ebp: cffe5ee0
ds: 0018 es: 0018 ss: 0018
Process swapper (pid: 1, stackpage=cffe5000)
Stack: c0276018 c0275fb4 c01b9dbf c1469a00 c02e31f4 c1469b18 c02e3100 00000001
00000286 00000001 00000001 c0113623 c02b5fe1 00000246 c0113574 c0244e02
c0244e9d c1469a00 c02e3100 c01b91cb c02448ec c02e3100 c1469037 c0244fc0
Call Trace: [<c01b9dbf>] [<c0113623>] [<c0113574>] [<c01b91cb>] [<c01b8d0c>]
[<c01b976a>] [<c01b9af1>] [<c0105007>] [<c0105488>]
Code: 8b 04 8a 83 f8 ff 75 0c 83 c6 20 eb e7 8d b4 26 00 00 00 00Quoted 1 line
Quoted 1 line
EIP;
c01b9bac<cdrom_get_entry+1c/50> <=====
Trace; c01b9dbf <register_cdrom+1bf/250> Trace; c0113623 <release_console_sem+73/80> Trace; c0113574 <printk+124/130>
Trace; c01b91cb <ide_cdrom_probe_capabilities+3eb/400> Trace; c01b8d0c <ide_cdrom_register+13c/150> Trace; c01b976a <ide_cdrom_setup+49a/4e0> Trace; c01b9af1 <ide_cdrom_init+e1/180> Trace; c0105007 <init+7/110>
Trace; c0105488 <kernel_thread+28/40>
Code; c01b9bac <cdrom_get_entry+1c/50> 00000000 <_EIP>:
Code; c01b9bac <cdrom_get_entry+1c/50> <=====
0: 8b 04 8a movl (%edx,%ecx,4),%eax <=====
Code; c01b9baf <cdrom_get_entry+1f/50>
3: 83 f8 ff cmpl $0xffffffff,%eax
Code; c01b9bb2 <cdrom_get_entry+22/50>
6: 75 0c jne 14 <_EIP+0x14> c01b9bc0 <cdrom_get_entry+30/50>
Code; c01b9bb4 <cdrom_get_entry+24/50>
8: 83 c6 20 addl $0x20,%esi
Code; c01b9bb7 <cdrom_get_entry+27/50>
b: eb e7 jmp fffffff4 <_EIP+0xfffffff4> c01b9ba0 <cdrom_get_entry+10/50>
Code; c01b9bb9 <cdrom_get_entry+29/50>
d: 8d b4 26 00 00 00 00 leal 0x0(%esi,1),%esi
<0>Kernel panic: Attempted to kill init!
Quoted 10 lines · On 04.20 Udo A. Steinberg wrote:
Quoted 3 lines · Alan Cox
Quoted 3 lines
Just built 2.4.3-ac10 and got an oops when booting. It tries to detect the CD and gives the oops.
I'm getting a similar oops with -ac10. I initially thought this might be a result of switching to gcc-2.95.3, because -ac9 runs fine when built with gcc-2.95.2, but if others have seen this too, it's probably the cdrom code indeed.
Mine is built with gcc-2.96-0.48mdk.
--
J.A. Magallon # Let the source mailto:[email protected] # be with you, Luke...
Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686
Quoted 6 lines · On 04.20 Alan Cox wrote:
Quoted 2 lines
Just built 2.4.3-ac10 and got an oops when booting. It tries to detect the CD and gives the oops.
Can you back out the ide-cd changes Jens did and see if that fixes it ?
Reverted the changes in ide-cd.[hc], and same result.
Bootlog from ac9:
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller on PCI bus 00 dev 39
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:piohda: IOMEGA ZIP 250 ATAPI, ATAPI FLOPPY drive
hdc: CREATIVE CD5230E, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hdc: ATAPI 52X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
<<<<<<<<<<<< here, ac10 oopses >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
hda: 244736kB, 239/64/32 CHS, 4096 kBps, 512 sector size, 2941 rpm
ide-floppy: hda: I/O error, pc = 5a, key = 5, asc = 24, ascq = 0
Signature · 4 lines
J.A. Magallon # Let the source mailto:[email protected] # be with you, Luke... Linux werewolf 2.4.3-ac9 #1 SMP Wed Apr 18 10:35:48 CEST 2001 i686
Quoted 3 lines · J . A . Magallon
Quoted 1 line
Can you back out the ide-cd changes Jens did and see if that fixes it ?
Reverted the changes in ide-cd.[hc], and same result.
You want to back out the stuff from drivers/cdrom/cdrom.c; I backed out the parts of the patch new there to ac10, and it worked again for me...
Bill
Quoted 10 lines · Bill Nottingham
Quoted 3 lines · J . A . Magallon
Quoted 1 line
Can you back out the ide-cd changes Jens did and see if that fixes it ?
Reverted the changes in ide-cd.[hc], and same result.
You want to back out the stuff from
drivers/cdrom/cdrom.c; I backed out the parts of the patch new there to ac10, and it worked again for me...
Quoted 6 lines
Bill
-
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/
That worked here as well...here is a patch that should restore linux/drivers/cdrom/cdrom.c back to its working ac9 state from ac10.
Jordan
drivers/cdrom/cdrom.c +5 -74
@@ -279,9 +279,6 @@static int lockdoor =1 ;/* will we ever get to use this... sigh. */ static int check_media_type; -static unsigned long *cdrom_numbers; -static DECLARE_MUTEX (cdrom_sem); -MODULE_PARM (debug,"i" );MODULE_PARM (autoclose,"i" );MODULE_PARM (autoeject,"i" );
@@ -343,38 +340,6 @@ check_media_change: cdrom_media_changed, }; -/* -* get or clear a new cdrom number, run under cdrom_sem -*/ -static int cdrom_get_entry (void ) -{ -int i, nr, foo; - - nr =0 ; - foo =-1 ; -for (i =0 ; i <CDROM_MAX_CDROMS / (sizeof (unsigned long ) *8 ); i++) { -if (cdrom_numbers[i] == ~0UL ) { - nr +=sizeof (unsigned long ) *8 ; -continue ; - } - foo =ffz (cdrom_numbers[i]); -set_bit (foo, &cdrom_numbers[i]); - nr += foo; -break ; - } - -return foo ==-1 ? foo : nr; -} - -static void cdrom_clear_entry (struct cdrom_device_info *cdi) -{ -int bit_nr = cdi->nr & ~(sizeof (unsigned long ) *8 ); -int cd_index = cdi->nr / (sizeof (unsigned long ) *8 ); - -clear_bit (bit_nr, &cdrom_numbers[cd_index]); -} - -/* This macro makes sure we don't have to check on cdrom_device_ops * existence in the run-time routines below. Change_capability is a * hack to have the capability flags defined const, while we can still
@@ -389,6 +354,7 @@struct cdrom_device_ops *cdo = cdi->ops;int *change_capability = (int *)&cdo->capability;/* hack */ char vname[16 ]; +static unsigned int cdrom_counter;cdinfo (CD_OPEN ,"entering register_cdrom\n" );
@@ -429,17 +395,7 @@if (!devfs_handle) devfs_handle =devfs_mk_dir (NULL ,"cdroms" ,NULL ); - -/* -* get new cdrom number -*/ -down (&cdrom_sem); - cdi->nr =cdrom_get_entry (); -up (&cdrom_sem); -if (cdi->nr ==-1 ) -return -ENOMEM ; - -sprintf (vname,"cdrom%u" , cdi->nr); +sprintf (vname,"cdrom%u" , cdrom_counter++);if (cdi->de) {int pos;devfs_handle_t slave;
@@ -462,13 +418,9 @@S_IFBLK |S_IRUGO |S_IWUGO , &cdrom_fops, NULL); } - -down (&cdrom_sem); +cdinfo (CD_REG_UNREG ,"drive \"/dev/%s\" registered\n" , cdi->name); cdi->next = topCdromPtr; topCdromPtr = cdi; -up (&cdrom_sem); - -cdinfo (CD_REG_UNREG ,"drive \"/dev/%s\" registered\n" , cdi->name);return 0 ; }#undef ENSURE
@@ -477,14 +429,12 @@ {struct cdrom_device_info *cdi, *prev;int major =MAJOR (unreg->dev); -int bit_nr, cd_index;cdinfo (CD_OPEN ,"entering unregister_cdrom\n" );if (major <0 || major >=MAX_BLKDEV )return -1 ; -down (&cdrom_sem); prev =NULL ; cdi = topCdromPtr;while (cdi !=NULL && cdi->dev != unreg->dev) {
@@ -492,20 +442,14 @@ cdi = cdi->next; } -if (cdi ==NULL ) { -up (&cdrom_sem); +if (cdi ==NULL )return -2 ; - } - -cdrom_clear_entry (cdi); -if (prev) prev->next = cdi->next;else topCdromPtr = cdi->next; -up (&cdrom_sem); cdi->ops->n_minors--; -devfs_unregister (cdi->de); +devfs_unregister (cdi->de);cdinfo (CD_REG_UNREG ,"drive \"/dev/%s\" unregistered\n" , cdi->name);return 0 ; }
@@ -514,14 +458,10 @@ {struct cdrom_device_info *cdi; -down (&cdrom_sem); - cdi = topCdromPtr;while (cdi !=NULL && cdi->dev != dev) cdi = cdi->next; -up (&cdrom_sem); -return cdi; }
@@ -2489,8 +2429,6 @@ } pos =sprintf (info,"CD-ROM information, " VERSION "\n" ); - -down (&cdrom_sem); pos +=sprintf (info+pos,"\ndrive name:\t" );for (cdi=topCdromPtr;cdi!=NULL ;cdi=cdi->next)
@@ -2560,8 +2498,6 @@for (cdi=topCdromPtr;cdi!=NULL ;cdi=cdi->next) pos +=sprintf (info+pos,"\t%d" ,CDROM_CAN (CDC_DVD_RAM ) !=0 ); -up (&cdrom_sem); -strcpy (info+pos,"\n\n" );return proc_dostring (ctl, write, filp, buffer, lenp);
@@ -2708,10 +2644,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
@@ -2722,7 +2654,6 @@ static void __exit cdrom_exit(void) {printk (KERN_INFO "Uniform CD-ROM driver unloaded\n" ); -kfree (cdrom_numbers);#ifdef CONFIG_SYSCTL cdrom_sysctl_unregister ();#endif
Quoted 5 lines · J . A . Magallon
Hi,
Just built 2.4.3-ac10 and got an oops when booting. It tries to detect the CD and gives the oops.
Quoted 1 line
Quoted 1 line
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