linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 2.4.21-pre4 seq_read() fix backport
@ 2003-01-31 13:52 Eric Sandeen
  0 siblings, 0 replies; only message in thread
From: Eric Sandeen @ 2003-01-31 13:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: viro, marcelo

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 */




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-31 13:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-31 13:52 [PATCH] 2.4.21-pre4 seq_read() fix backport Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).