Patchwork kernel BUG at drivers/ide/ide-disk.c:187 (2.6.31)

login
register
mail settings
Submitter David Miller
Date Oct. 1, 2009, 6:53 p.m.
Message ID <20091001.115310.100974682.davem@davemloft.net>
Download mbox | patch
Permalink /patch/34764/
State RFC
Delegated to: David Miller
Headers show

Comments

David Miller - Oct. 1, 2009, 6:53 p.m.
From: David Miller <davem@davemloft.net>
Date: Thu, 01 Oct 2009 11:47:55 -0700 (PDT)

> Please add this test patch and let us know what messages
> you end up with in the logs.  It won't BUG() any more,
> so you have to watch for the messages.

Sorry, there's a small bug in the test patch, please use this one
instead.

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Santiago Garcia Mantinan - Oct. 3, 2009, 3:39 a.m.
> Sorry, there's a small bug in the test patch, please use this one
> instead.

Applied it to 2.6.31.1, I'll wait and see what the weekend tells us.

BTW, I forgot to include info on the controller, disks, ... on the report,
so here they go just in case they make any difference.

Uniform Multi-Platform E-IDE driver
via82cxxx 0000:00:07.1: VIA vt82c596b (rev 23) IDE UDMA66
via82cxxx 0000:00:07.1: IDE controller (0x1106:0x0571 rev 0x10)
via82cxxx 0000:00:07.1: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0xe800-0xe807
    ide1: BM-DMA at 0xe808-0xe80f
Probing IDE interface ide0...
hda: HL-DT-STDVD-RAM GH22NP20, ATAPI CD/DVD-ROM drive
hdb: ST3160021A, ATA DISK drive
hda: host max PIO5 wanted PIO255(auto-tune) selected PIO4
hda: UDMA/66 mode selected
hdb: host max PIO5 wanted PIO255(auto-tune) selected PIO4
hdb: UDMA/66 mode selected
Probing IDE interface ide1...
hdc: ST3160021A, ATA DISK drive
hdc: host max PIO5 wanted PIO255(auto-tune) selected PIO4
hdc: UDMA/66 mode selected
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide-gd driver 1.18
hdb: max request size: 512KiB
hdb: Host Protected Area detected.
        current capacity is 312579695 sectors (160040 MB)
        native  capacity is 312581808 sectors (160041 MB)
hdb: 312579695 sectors (160040 MB) w/2048KiB Cache, CHS=19457/255/63
hdb: cache flushes supported
 hdb: hdb1 hdb2 hdb3
hdc: max request size: 512KiB
hdc: Host Protected Area detected.
        current capacity is 312579695 sectors (160040 MB)
        native  capacity is 312581808 sectors (160041 MB)
hdc: 312579695 sectors (160040 MB) w/2048KiB Cache, CHS=19457/255/63
hdc: cache flushes supported
 hdc: hdc1 hdc2 hdc3
ide-cd driver 5.00
ide-cd: hda: ATAPI 48X DVD-ROM DVD-R/RAM CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20

Regards...
Santiago Garcia Mantinan - Oct. 4, 2009, 10:37 p.m.
> Applied it to 2.6.31.1, I'll wait and see what the weekend tells us.

up 2 days,  8:27 and still nothing, maybe I shouldn't have applied it to .1
as some of the fixes there could be masking the problem and I should be
testing it on 2.6.31 :-?

What do you think about, that, should I compile a plain 2.6.31? or should I
give 2.6.31.1 some more time?

On the other hand when I tried to compile a kernel for a non IDE machine out
of the same 2.6.31.1 patched sources I found this error:

ERROR: "ide_kill_rq" [drivers/ide/ide-gd_mod.ko] undefined!
make[2]: *** [__modpost] Erro 1
make[1]: *** [modules] Erro 2
make[1]: SaĆ­ndo do directorio `/usr/src/linux-2.6.31'

After reverting the patch it compiled ok, of course, I was wondering if this
only affects the modules build and for the test we are having I have IDE in
the kernel, so no problem with that, or if that can affect the IDE kernel as
well and it may break because of the patch or something.

Regards...
David Miller - Oct. 5, 2009, 12:19 a.m.
From: Santiago Garcia Mantinan <manty@manty.net>
Date: Mon, 5 Oct 2009 00:37:05 +0200

>> Applied it to 2.6.31.1, I'll wait and see what the weekend tells us.
> 
> up 2 days,  8:27 and still nothing, maybe I shouldn't have applied it to .1
> as some of the fixes there could be masking the problem and I should be
> testing it on 2.6.31 :-?

If 2.6.31.1 fixes your bug, that would be good news :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index 7f87801..6e0dfa9 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -184,7 +184,12 @@  static ide_startstop_t ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
 	ide_hwif_t *hwif = drive->hwif;
 
 	BUG_ON(drive->dev_flags & IDE_DFLAG_BLOCKED);
-	BUG_ON(!blk_fs_request(rq));
+	if (!blk_fs_request(rq)) {
+		pr_alert("IDE: Non-FS req in ide_do_rw_disk(), cmd_type %d\n",
+			 rq->cmd_type);
+		ide_kill_rq(drive, rq);
+		return ide_stopped;
+	}
 
 	ledtrig_ide_activity();