[PATCH] 2.4.21-pre4 seq_read() fix backport

Eric Sandeen (sandeen@sgi.com)
Fri, 31 Jan 2003 07:52:30 -0600 (CST)


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/seq_file.c@1.5?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 */

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