lkml.org 
[lkml]   [2006]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] make last_inode counter in new_inode 32-bit on kernels that offer x86 compatability
Things are getting more interesting.  simple_fill_super() looked like
a bug waiting to happen. It is fairly hard to trigger, but still.
This should fix it, although in a fairly crude manner.

The other callers were save - it is hard to have the root inode
collide with anything existing.

Jörn

--
Good warriors cause others to come to them and do not go to others.
-- Sun Tzu


Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
---
fs/libfs.c | 2 ++
1 file changed, 2 insertions(+)
--- iunique/fs/libfs.c~iunique_libfs 2006-10-13 15:56:01.000000000 +0200
+++ iunique/fs/libfs.c 2006-11-07 18:54:21.000000000 +0100
@@ -381,6 +381,8 @@ int simple_fill_super(struct super_block
inode = new_inode(s);
if (!inode)
return -ENOMEM;
+ /* ino must not collide with any ino assigned in the loop below */
+ inode->i_ino = 0x8000000;
inode->i_mode = S_IFDIR | 0755;
inode->i_uid = inode->i_gid = 0;
inode->i_blksize = PAGE_CACHE_SIZE;
-
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: 2006-11-07 18:59    [from the cache]
©2003-2011 Jasper Spaans