2.5.68 oops booting with initrd
Very small and simple kernel configuration (includes devfs, which is where this problem came from), using Etherboot to load it along with a small (768K) initrd.
Unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: c0109835 *pde = 00000000 Oops: 0002 [#1] CPU: 0 EIP: 0060:[<c0109835>] Not tainted EFLAGS: 00010002
EIP is at __down+0x55/0xc0
eax: 00000000 ebx: c021c190 ecx: c021c190 edx: c151de5c
esi: 00000286 edi: dfece040 ebp: c021c198 esp: c151de50
ds: 007b es: 007b ss: 0068
Process swapper (pid: 1, threadinfo=c151c000 task=dfece040)
Stack: 00000001 dfece040 c0114000 c021c198 00000000 63736900 69642f73 00306373
c154bd80 00000000 c154be6c dfcfe6c0 c01099cc c021c190 c021c180
00000000
c01772d9 c154be40 c01a292a dff228a0 c154bd80 dff294c0 c017722c
c021c180
Call Trace:
[<c0114000>] default_wake_function+0x0/0x20
[<c01099cc>] __down_failed+0x8/0xc
[<c01772d9>] .text.lock.util+0x55/0x7c
[<c01a292a>] blk_unregister_region+0x9a/0xa0
[<c017722c>] devfs_remove_partitions+0x3c/0x50
[<c01687ed>] del_gendisk+0xfd/0x100
[<c01a567f>] initrd_release+0x3f/0x70
[<c014002b>] __fput+0x9b/0xa0
[<c013e8bd>] filp_close+0x4d/0x80
[<c013e940>] sys_close+0x50/0x60
[<c010a98b>] syscall_call+0x7/0xb
[<c026b6dd>] rd_load_image+0xbd/0x390
[<c026be96>] initrd_load+0x56/0x80
[<c026ae93>] prepare_namespace+0x33/0x120
[<c010506a>] init+0x2a/0x140
[<c0105040>] init+0x0/0x140
[<c0108a3d>] kernel_thread_helper+0x5/0x18
Code: 89 10 89 44 24 10 ff 43 04 89 f6 8b 43 04 48 01 03 0f 98 c0
<0>Kernel panic: Attempted to kill init!.config is as follows:
CONFIG_X86=yCONFIG_MMU=yCONFIG_UID16=yCONFIG_GENERIC_ISA_DMA=yCONFIG_EXPERIMENTAL=yCONFIG_SWAP=yCONFIG_X86_PC=yCONFIG_MK7=yCONFIG_X86_CMPXCHG=yCONFIG_X86_XADD=yCONFIG_RWSEM_XCHGADD_ALGORITHM=yCONFIG_X86_WP_WORKS_OK=yCONFIG_X86_INVLPG=yCONFIG_X86_BSWAP=yCONFIG_X86_POPAD_OK=yCONFIG_X86_GOOD_APIC=yCONFIG_X86_USE_PPRO_CHECKSUM=yCONFIG_X86_USE_3DNOW=yCONFIG_X86_TSC=yCONFIG_NOHIGHMEM=yCONFIG_PCI=yCONFIG_PCI_GODIRECT=yCONFIG_PCI_DIRECT=yCONFIG_PCI_NAMES=yCONFIG_HOTPLUG=yCONFIG_KCORE_ELF=yCONFIG_BINFMT_ELF=yCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_INITRD=yCONFIG_IDE=yCONFIG_BLK_DEV_IDE=yCONFIG_BLK_DEV_IDEDISK=yCONFIG_IDEDISK_MULTI_MODE=yCONFIG_BLK_DEV_IDECD=yCONFIG_BLK_DEV_IDEFLOPPY=yCONFIG_BLK_DEV_IDEPCI=yCONFIG_IDEPCI_SHARE_IRQ=yCONFIG_BLK_DEV_IDEDMA_PCI=yCONFIG_IDEDMA_PCI_AUTO=yCONFIG_BLK_DEV_IDEDMA=yCONFIG_BLK_DEV_ADMA=yCONFIG_IDEDMA_AUTO=yCONFIG_SCSI=yCONFIG_BLK_DEV_SD=yCONFIG_MD=yCONFIG_BLK_DEV_DM=yCONFIG_INPUT=yCONFIG_SOUND_GAMEPORT=yCONFIG_SERIO=yCONFIG_SERIO_I8042=yCONFIG_INPUT_KEYBOARD=yCONFIG_KEYBOARD_ATKBD=yCONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=yCONFIG_FAT_FS=yCONFIG_MSDOS_FS=yCONFIG_VFAT_FS=yCONFIG_PROC_FS=yCONFIG_DEVFS_FS=yCONFIG_DEVFS_MOUNT=yCONFIG_TMPFS=yCONFIG_RAMFS=yCONFIG_MSDOS_PARTITION=yCONFIG_NLS=yCONFIG_VGA_CONSOLE=yCONFIG_DUMMY_CONSOLE=yCONFIG_USB=yCONFIG_USB_DEVICEFS=yCONFIG_USB_EHCI_HCD=yCONFIG_USB_OHCI_HCD=yCONFIG_USB_UHCI_HCD=yCONFIG_USB_PRINTER=yCONFIG_USB_STORAGE=yCONFIG_DEBUG_KERNEL=yCONFIG_KALLSYMS=yCONFIG_X86_BIOS_REBOOT=y
Quoted 2 lines · Kevin P. Fleming
Very small and simple kernel configuration (includes devfs, which is where this problem came from), using Etherboot to load it along with a small (768K) initrd.
After sleeping on it I realized this problem may have been caused by neglecting to compile ext2 into the kernel (the initrd is an ext2 image). Unfortunately, that is not the solution, the oops still occurs.
Quoted 8 lines · Kevin P. Fleming
Very small and simple kernel configuration (includes devfs, which is where this problem came from), using Etherboot to load it along with a small (768K) initrd.
Call Trace: [<c0114000>] default_wake_function+0x0/0x20 [<c01099cc>] __down_failed+0x8/0xc [<c01772d9>] .text.lock.util+0x55/0x7c
This should fix it.
Signature · 23 lines
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
Index: fs/partitions/check.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/fs/partitions/check.c,v
retrieving revision 1.1.1.8
retrieving revision 1.6
diff -u -r1.1.1.8 -r1.6
--- fs/partitions/check.c 7 Apr 2003 17:32:48 -0000 1.1.1.8
+++ fs/partitions/check.c 13 Apr 2003 00:15:54 -0000 1.6
@@ -414,7 +414,8 @@
unlink_gendisk(disk);
disk_stat_set_all(disk, 0);
disk->stamp = disk->stamp_idle = 0;
- devfs_remove_partitions(disk);
+ if (disk->minors != 1)
+ devfs_remove_partitions(disk);
if (disk->driverfs_dev) {
sysfs_remove_link(&disk->kobj, "device");
sysfs_remove_link(&disk->driverfs_dev->kobj, "block");Quoted 5 lines · Herbert Xu
Quoted 1 line · Kevin P. Fleming
Very small and simple kernel configuration (includes devfs, which is where this problem came from), using Etherboot to load it along with a small (768K) initrd.
Quoted 7 lines
Quoted 4 lines
Call Trace: [<c0114000>] default_wake_function+0x0/0x20 [<c01099cc>] __down_failed+0x8/0xc [<c01772d9>] .text.lock.util+0x55/0x7cThis should fix it.
The patch you supplied (check disk->minors != 1 before calling devfs_remove_partitions) did not apply do 2.5.68; the code in fs/partitions/check.c has changed since your base version. However, hand-editing to do the same check has solved the problem.
I'll Christoph supply a patch, since he's the one that's been working in that whole devfs area.
Quoted 7 lines · Kevin P. Fleming
The patch you supplied (check
disk->minors!= 1 before callingdevfs_remove_partitions) did not apply do 2.5.68; the code infs/partitions/check.chas changed since your base version. However, hand-editing to do the same check has solved the problem.I'll Christoph supply a patch, since he's the one that's been working in that whole devfs area.
And 2.5.58-bk1 is completly different again but should have fixed it.
Make sure you apply the following diff when using devfs, though:
fs/partitions/devfs.c +1 -1
@@ -81,7 +81,7 @@ {char dirname[64 ], symlink[16 ]; -if (disk->devfs_name[0 ] !='\0' ) +if (disk->devfs_name[0 ] =='\0' )sprintf (disk->devfs_name,"%s/disc%d" , disk->disk_name, disk->first_minor >> disk->minor_shift);