2003-01-31 13:47:50

by Eric Sandeen

[permalink] [raw]
Subject: [PATCH] 2.4.21-pre4 seq_read() fix backport

Al Viro fixed a bug in seq_read for 2.5.31, still needs to be
backported to 2.4.x. Allows uninitialized data to be read, I think.

You can observe this by adding many (75+, I think) lvm volumes
and do a cat of "/proc/partitions" with slab debugging turned on.

http://linux.bkbits.net:8080/linux-2.5/diffs/fs/[email protected]?nav=index.html|src/|src/fs|hist/fs/seq_file.c

--- 1.4/fs/seq_file.c Wed May 22 05:44:20 2002
+++ 1.5/fs/seq_file.c Thu Aug 8 23:46:33 2002
@@ -94,8 +94,10 @@
m->buf = kmalloc(m->size <<= 1, GFP_KERNEL);
if (!m->buf)
goto Enomem;
+ m->count = 0;
}
m->op->stop(m, p);
+ m->count = 0;
goto Done;
Fill:
/* they want more? let's try to get some more */