1. 20 9月, 2007 1 次提交
  2. 17 7月, 2007 1 次提交
    • V
      ext3/ext4: orphan list corruption due bad inode · a6c15c2b
      Vasily Averin 提交于
      After ext3 orphan list check has been added into ext3_destroy_inode()
      (please see my previous patch) the following situation has been detected:
      
       EXT3-fs warning (device sda6): ext3_unlink: Deleting nonexistent file (37901290), 0
       Inode 00000101a15b7840: orphan list check failed!
       00000773 6f665f00 74616d72 00000573 65725f00 06737270 66000000 616d726f
      ...
       Call Trace: [<ffffffff80211ea9>] ext3_destroy_inode+0x79/0x90
        [<ffffffff801a2b16>] sys_unlink+0x126/0x1a0
        [<ffffffff80111479>] error_exit+0x0/0x81
        [<ffffffff80110aba>] system_call+0x7e/0x83
      
      First messages said that unlinked inode has i_nlink=0, then ext3_unlink()
      adds this inode into orphan list.
      
      Second message means that this inode has not been removed from orphan list.
       Inode dump has showed that i_fop = &bad_file_ops and it can be set in
      make_bad_inode() only.  Then I've found that ext3_read_inode() can call
      make_bad_inode() without any error/warning messages, for example in the
      following case:
      
      ...
              if (inode->i_nlink == 0) {
                      if (inode->i_mode == 0 ||
                          !(EXT3_SB(inode->i_sb)->s_mount_state & EXT3_ORPHAN_FS)) {
                              /* this inode is deleted */
                              brelse (bh);
                              goto bad_inode;
      ...
      
      Bad inode can live some time, ext3_unlink can add it to orphan list, but
      ext3_delete_inode() do not deleted this inode from orphan list.  As result
      we can have orphan list corruption detected in ext3_destroy_inode().
      
      However it is not clear for me how to fix this issue correctly.
      
      As far as i see is_bad_inode() is called after iget() in all places
      excluding ext3_lookup() and ext3_get_parent().  I believe it makes sense to
      add bad inode check to these functions too and call iput if bad inode
      detected.
      Signed-off-by: NVasily Averin <vvs@sw.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a6c15c2b
  3. 09 5月, 2007 2 次提交
  4. 13 2月, 2007 1 次提交
  5. 12 2月, 2007 2 次提交
  6. 09 12月, 2006 1 次提交
  7. 08 12月, 2006 1 次提交
    • E
      [PATCH] handle ext3 directory corruption better · 40b85134
      Eric Sandeen 提交于
      I've been using Steve Grubb's purely evil "fsfuzzer" tool, at
      http://people.redhat.com/sgrubb/files/fsfuzzer-0.4.tar.gz
      
      Basically it makes a filesystem, splats some random bits over it, then
      tries to mount it and do some simple filesystem actions.
      
      At best, the filesystem catches the corruption gracefully.  At worst,
      things spin out of control.
      
      As you might guess, we found a couple places in ext3 where things spin out
      of control :)
      
      First, we had a corrupted directory that was never checked for
      consistency...  it was corrupt, and pointed to another bad "entry" of
      length 0.  The for() loop looped forever, since the length of
      ext3_next_entry(de) was 0, and we kept looking at the same pointer over and
      over and over and over...  I modeled this check and subsequent action on
      what is done for other directory types in ext3_readdir...
      
      (adding this check adds some computational expense; I am testing a followup
      patch to reduce the number of times we check and re-check these directory
      entries, in all cases.  Thanks for the idea, Andreas).
      
      Next we had a root directory inode which had a corrupted size, claimed to
      be > 200M on a 4M filesystem.  There was only really 1 block in the
      directory, but because the size was so large, readdir kept coming back for
      more, spewing thousands of printk's along the way.
      
      Per Andreas' suggestion, if we're in this read error condition and we're
      trying to read an offset which is greater than i_blocks worth of bytes,
      stop trying, and break out of the loop.
      
      With these two changes fsfuzz test survives quite well on ext3.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      40b85134
  8. 01 10月, 2006 4 次提交
  9. 27 9月, 2006 3 次提交
  10. 01 8月, 2006 1 次提交
    • N
      [PATCH] ext3: avoid triggering ext3_error on bad NFS file handle · 2ccb48eb
      Neil Brown 提交于
      The inode number out of an NFS file handle gets passed eventually to
      ext3_get_inode_block() without any checking.  If ext3_get_inode_block()
      allows it to trigger an error, then bad filehandles can have unpleasant
      effect - ext3_error() will usually cause a forced read-only remount, or a
      panic if `errors=panic' was used.
      
      So remove the call to ext3_error there and put a matching check in
      ext3/namei.c where inode numbers are read off storage.
      
      [akpm@osdl.org: fix off-by-one error]
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Cc: <stable@kernel.org>
      Cc: "Stephen C. Tweedie" <sct@redhat.com>
      Cc: Eric Sandeen <esandeen@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2ccb48eb
  11. 26 6月, 2006 1 次提交
  12. 12 3月, 2006 1 次提交
  13. 15 1月, 2006 1 次提交
  14. 09 1月, 2006 1 次提交
  15. 31 10月, 2005 1 次提交
    • B
      [PATCH] ext3: sparse fixes · 381be254
      Ben Dooks 提交于
      Fix warnings from sparse due to un-declared functions that should either
      have a header file or have been declared static
      
       fs/ext2/bitmap.c:14:15: warning: symbol 'ext2_count_free' was not declared. Should it be static?
       fs/ext2/namei.c:92:15: warning: symbol 'ext2_get_parent' was not declared. Should it be static?
       fs/ext3/bitmap.c:15:15: warning: symbol 'ext3_count_free' was not declared. Should it be static?
       fs/ext3/namei.c:1013:15: warning: symbol 'ext3_get_parent' was not declared. Should it be static?
       fs/ext3/xattr.c:214:1: warning: symbol 'ext3_xattr_block_get' was not declared. Should it be static?
       fs/ext3/xattr.c:358:1: warning: symbol 'ext3_xattr_block_list' was not declared. Should it be static?
       fs/ext3/xattr.c:630:1: warning: symbol 'ext3_xattr_block_find' was not declared. Should it be static?
       fs/ext3/xattr.c:863:1: warning: symbol 'ext3_xattr_ibody_find' was not declared. Should it be static?
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      381be254
  16. 24 6月, 2005 2 次提交
  17. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4