Kernel OOPs with 2.6.22-14-generic when using the problematic drives
ST320413A and ST340823A. Official kernel 2.6.24-rc1 works fine.

There seems to be a problem with the call to strstr in the black list
checking code (dmesg below). I do not know why the same code works fine
for 2.6.24-rc1. I include a patch with its description.

Subject: [PATCH] ide: correct hpa blacklist in ide-disk.c to avoid
oopses

From: Jorge Juan <[EMAIL PROTECTED]>

Some drives reporting an extra sector are blacklisted in ide-disk.c, which 
solved bug 8816
(http://bugzilla.kernel.org/show_bug.cgi?id=8816). However, some systems oopses 
when checking
the blacklist, like Ubuntu 2.6.22-14 kernels. This patch changes the firmware 
version from
NULL to "ALL" in the list which solves the problem.

Signed-off-by: Jorge Juan <[EMAIL PROTECTED]>

---

--- linux-source-2.6.22/drivers/ide/ide-disk.c.orig     2007-11-05 
18:20:32.000000000 +0100
+++ linux-source-2.6.22/drivers/ide/ide-disk.c  2007-10-31 17:46:19.000000000 
+0100
@@ -488,9 +488,9 @@ static inline int idedisk_supports_lba48
  * maximum sector address.  We list them here.
  */
 static const struct drive_list_entry hpa_list[] = {
-       { "ST340823A",  NULL },
-       { "ST320413A",  NULL },
-       { NULL,         NULL }
+       { "ST340823A",  "ALL" },
+       { "ST320413A",  "ALL" },
+       { NULL,         NULL  }
 };
 #endif

Relevant dmesg output:

[    0.000000] Linux version 2.6.22-14-generic ([EMAIL PROTECTED]) (gcc version 
4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Sun Oct 14 
21:45:15 GMT 2007 (Ubuntu 2.6.22-14.46-generic)
[    0.000000] Command line: root=UUID=9d3c2aff-a615-4e45-b464-7460ad58439a ro 
single
...
[   17.937552] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
[   17.937619] ide: Assuming 33MHz system bus speed for PIO modes; override 
with idebus=xx
[   17.940072] ALI15X3: IDE controller at PCI slot 0000:00:0e.0
[   17.940140] ACPI: PCI Interrupt 0000:00:0e.0[A] -> GSI 19 (level, low) -> 
IRQ 19
[   17.940254] ALI15X3: chipset revision 199
[   17.940308] ALI15X3: not 100% native mode: will probe irqs later
[   17.940376]     ide0: BM-DMA at 0xff00-0xff07, BIOS settings: hda:DMA, 
hdb:pio
[   17.940516]     ide1: BM-DMA at 0xff08-0xff0f, BIOS settings: hdc:DMA, 
hdd:pio
[   17.940653] Probing IDE interface ide0...
[   17.960757] SCSI subsystem initialized
[   17.965697] libata version 2.21 loaded.
[   17.976720] usbcore: registered new interface driver usbfs
[   17.976804] usbcore: registered new interface driver hub
[   17.976880] usbcore: registered new device driver usb
[   17.977639] ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) 
Driver
[   18.053690] Floppy drive(s): fd0 is 1.44M
[   18.087444] FDC 0 is a post-1991 82077
[   18.257634] hda: ST320413A, ATA DISK drive
[   18.933359] hda: selected mode 0x45
[   18.933675] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[   18.935895] Probing IDE interface ide1...
[   19.673606] hdc: HL-DT-ST DVDRAM GSA-4167B, ATAPI CD/DVD-ROM drive
[   20.013336] hdc: selected mode 0x42
[   20.014152] ide1 at 0x170-0x177,0x376 on irq 15
[   20.020228] sata_uli 0000:00:0e.1: version 1.2
[   20.020295] ACPI: PCI Interrupt 0000:00:0e.1[A] -> GSI 19 (level, low) -> 
IRQ 19
[   20.020966] scsi0 : sata_uli
[   20.021242] scsi1 : sata_uli
[   20.021442] ata1: SATA max UDMA/133 cmd 0x0000000000010f80 ctl 
0x0000000000010f02 bmdma 0x000000000001d880 irq 19
[   20.021533] ata2: SATA max UDMA/133 cmd 0x0000000000010e80 ctl 
0x0000000000010e02 bmdma 0x000000000001d888 irq 19
[   20.028661] hda: max request size: 128KiB
[   20.037381] Unable to handle kernel NULL pointer dereference at 
0000000000000000 RIP: 
[   20.037428]  [<ffffffff80326cf2>] strlen+0x2/0x20
[   20.037583] PGD 37a8c067 PUD 37c45067 PMD 0 
[   20.037721] Oops: 0000 [1] SMP 
[   20.037828] CPU 0 
[   20.037905] Modules linked in: ide_cd cdrom ide_disk ata_generic floppy 
ehci_hcd ohci_hcd usbcore sata_uli libata scsi_mod alim15x3 ide_core thermal 
processor fan fuse apparmor commoncap
[   20.038577] Pid: 2205, comm: modprobe Not tainted 2.6.22-14-generic #1
[   20.038636] RIP: 0010:[<ffffffff80326cf2>]  [<ffffffff80326cf2>] 
strlen+0x2/0x20
[   20.038743] RSP: 0018:ffff81003d293b90  EFLAGS: 00010246
[   20.038800] RAX: 0000000000000000 RBX: ffff8100379f4e2e RCX: 0000000000000080
[   20.038860] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[   20.038921] RBP: 0000000000000000 R08: ffff81003d292000 R09: 0000000000000007
[   20.038982] R10: 0000000000000000 R11: ffffffff803b4e90 R12: 0000000000000000
[   20.039044] R13: ffff8100379f4e2e R14: ffffffff880437c9 R15: ffffc200001a6070
[   20.039105] FS:  00002b2cfcd686e0(0000) GS:ffffffff80560000(0000) 
knlGS:0000000000000000
[   20.039184] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   20.039242] CR2: 0000000000000000 CR3: 000000003d783000 CR4: 00000000000006e0
[   20.039303] Process modprobe (pid: 2205, threadinfo ffff81003d292000, task 
ffff810037f246e0)
[   20.039382] Stack:  ffffffff80326fd0 ffffffff8810c170 0000000000000000 
ffff8100379f4e36
[   20.039602]  ffffffff8803f95f ffffffff88052418 000000000254a781 
ffffffff88052418
[   20.039791]  000000000254a780 0000000000000000 ffffffff8810a75b 
ffff81003d277120
[   20.039936] Call Trace:
[   20.040031]  [<ffffffff80326fd0>] strstr+0x20/0x80
[   20.040109]  [<ffffffff8803f95f>] :ide_core:ide_in_drive_list+0x4f/0x80
[   20.040173]  [<ffffffff8810a75b>] :ide_disk:idedisk_check_hpa+0xbb/0x3e0
[   20.040237]  [<ffffffff802361fe>] printk+0x4e/0x60
[   20.040301]  [<ffffffff8803ce10>] :ide_core:task_no_data_intr+0x0/0xc0
[   20.040368]  [<ffffffff88040c84>] :ide_core:ide_add_setting+0x34/0x40
[   20.040430]  [<ffffffff8810b66e>] :ide_disk:ide_disk_probe+0x48e/0x720
[   20.040494]  [<ffffffff80391063>] driver_probe_device+0xa3/0x1b0
[   20.040554]  [<ffffffff80391329>] __driver_attach+0xc9/0xd0
[   20.040612]  [<ffffffff80391260>] __driver_attach+0x0/0xd0
[   20.040671]  [<ffffffff8039023d>] bus_for_each_dev+0x4d/0x80
[   20.040730]  [<ffffffff8039069f>] bus_add_driver+0xaf/0x1f0
[   20.040791]  [<ffffffff80256edb>] sys_init_module+0x19b/0x19b0
[   20.040852]  [<ffffffff80326a21>] __up_write+0x21/0x130
[   20.040912]  [<ffffffff80209e8e>] system_call+0x7e/0x83
[   20.040969] 
[   20.041016] 
[   20.041017] Code: 80 3f 00 74 15 48 89 f8 66 0f 1f 44 00 00 48 83 c0 01 80 
38 
[   20.041723] RIP  [<ffffffff80326cf2>] strlen+0x2/0x20
[   20.041808]  RSP <ffff81003d293b90>
[   20.041859] CR2: 0000000000000000

-- 
Possible fake host protected area (hpa) detected in ide drive causing 
SectorIdNotFound
https://bugs.launchpad.net/bugs/26119
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to