]> git.hungrycats.org Git - linux/commitdiff
[PATCH] hpt366.c: fix 'cat /proc/ide/hpt366' crash
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Tue, 13 Apr 2004 11:28:16 +0000 (04:28 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 13 Apr 2004 11:28:16 +0000 (04:28 -0700)
Disable code doing outb() without any locking in /proc handler.
Otherwise 'cat /proc/ide/hpt366' crashes if done during I/O.

Noticed by John Stoffel <stoffel@lucent.com>.

drivers/ide/pci/hpt366.c

index 6b524e4aec50a919766d01670364c8f446a1ca36..d3129b2a9b2c639fad2add6c9ec14042c43ff997 100644 (file)
@@ -107,7 +107,7 @@ static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count)
                                "                             %s\n",
                        (c0 & 0x80) ? "no" : "yes",
                        (c1 & 0x80) ? "no" : "yes");
-
+#if 0
                if (hpt_minimum_revision(dev, 3)) {
                        u8 cbl;
                        cbl = inb(iobase + 0x7b);
@@ -120,7 +120,7 @@ static int hpt366_get_info (char *buffer, char **addr, off_t offset, int count)
                                (cbl & 0x01) ? 33 : 66);
                        p += sprintf(p, "\n");
                }
-
+#endif
                p += sprintf(p, "--------------- drive0 --------- drive1 "
                                "------- drive0 ---------- drive1 -------\n");
                p += sprintf(p, "DMA capable:    %s              %s"