buglet in pci_read_proc()

From: Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Date: Fri Apr 28 2000 - 10:45:19 EST


The bug showed up under redhat-6.2 where `cat' reads in 512-byte
blocks - `cat /proc/pci' prints only the 1st device.

Ivan.

--- linux-2.3.99-pre6/drivers/pci/proc.c Sun Feb 27 07:33:03 2000
+++ linux/drivers/pci/proc.c Fri Apr 28 18:45:00 2000
@@ -389,7 +389,7 @@
 
         *eof = 1;
         pci_for_each_dev(dev) {
- nprinted = sprint_dev_config(dev, buf + len, count - len);
+ nprinted = sprint_dev_config(dev, buf + len, count + off - len);
                 if (nprinted < 0) {
                         *eof = 0;
                         break;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:15 EST