]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Missing check in PCI hotplug.
authorDave Jones <davej@codemonkey.org.uk>
Wed, 8 Jan 2003 10:54:50 +0000 (02:54 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 8 Jan 2003 10:54:50 +0000 (02:54 -0800)
Missed forward port from 2.4. ACKed by GregKH

drivers/hotplug/pci_hotplug_core.c

index b6426a2277c847a8f2b1af7bc1b07e6065f332e5..935dd94a1615c9e007f8d194b2b202148b4059e3 100644 (file)
@@ -596,7 +596,7 @@ static ssize_t power_read_file (struct file *file, char *buf, size_t count, loff
 
        if (*offset < 0)
                return -EINVAL;
-       if (count <= 0)
+       if (count == 0 || count > 16384)
                return 0;
        if (*offset != 0)
                return 0;