From 1a1d77dd589de5a567fa95e36aa6999c704ceca4 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 28 Aug 2000 22:00:09 +0000 Subject: Merge with 2.4.0-test7. --- drivers/pci/proc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/pci/proc.c') diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 703b8c138..2a517f7d6 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -238,6 +238,13 @@ get_pci_dev_info(char *buf, char **start, off_t pos, int count) } else cnt += len; buf += len; + if (cnt >= count) + /* + * proc_file_read() gives us 1KB of slack so it's OK if the + * above printfs write a little beyond the buffer end (we + * never write more than 1KB beyond the buffer end). + */ + break; } } return (count > cnt) ? cnt : count; -- cgit v1.2.3