public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] zero out i_blocks in get_pipe_inode
@ 2003-11-11 23:04 Martin J. Bligh
  2003-11-11 22:48 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Martin J. Bligh @ 2003-11-11 23:04 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, viro, Andi Kleen

Fished from the 2.4 SuSE tree, which I'm trawling through.
This seems like a perfectly reasonable thing to do to me,
there was some discussion earlier on IRC. Some extracts from
the conversation were "returning random old data from the kernel 
is always a bug", "any userland code that trips on that one is 
broken", and "iirc it broke postfix". Nobody seemed to think it
was actively evil, and it seems to fix a bug ;-)

diff -purN -X /home/mbligh/.diff.exclude virgin/fs/pipe.c pipe_init/fs/pipe.c
--- virgin/fs/pipe.c	2003-10-14 15:50:30.000000000 -0700
+++ pipe_init/fs/pipe.c	2003-11-11 12:13:32.000000000 -0800
@@ -527,6 +527,7 @@ static struct inode * get_pipe_inode(voi
 	inode->i_gid = current->fsgid;
 	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
 	inode->i_blksize = PAGE_SIZE;
+	inode->i_blocks = 0;
 	return inode;
 
 fail_iput:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-11-11 23:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11 23:04 [PATCH] zero out i_blocks in get_pipe_inode Martin J. Bligh
2003-11-11 22:48 ` Andrew Morton
2003-11-11 22:50   ` Andi Kleen
2003-11-11 23:36   ` Martin J. Bligh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox