[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061107175601.GB29746@wohnheim.fh-wedel.de>
Date: Tue, 7 Nov 2006 18:56:01 +0100
From: Jörn Engel <joern@...nheim.fh-wedel.de>
To: Jeff Layton <jlayton@...hat.com>
Cc: Eric Sandeen <sandeen@...hat.com>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [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@...nheim.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists