lkml.org 
[lkml]   [2003]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] zero out i_blocks in get_pipe_inode
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:
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.694 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site