1. 06 Nov, 2015 2 commits
    • Ryusuke Konishi's avatar
      nilfs2: fix gcc uninitialized-variable warnings in powerpc build · 4f05028f
      Ryusuke Konishi authored
      Some false positive warnings are reported for powerpc build.
      
      The following warnings are reported in
       http://kisskb.ellerman.id.au/kisskb/buildresult/12519703/
      
         CC      fs/nilfs2/super.o
       fs/nilfs2/super.c: In function 'nilfs_resize_fs':
       fs/nilfs2/super.c:376:2: warning: 'blocknr' may be used uninitialized in this function [-Wuninitialized]
       fs/nilfs2/super.c:362:11: note: 'blocknr' was declared here
         CC      fs/nilfs2/recovery.o
       fs/nilfs2/recovery.c: In function 'nilfs_salvage_orphan_logs':
       fs/nilfs2/recovery.c:631:21: warning: 'sum' may be used uninitialized in this function [-Wuninitialized]
       fs/nilfs2/recovery.c:585:32: note: 'sum' was declared here
       fs/nilfs2/recovery.c: In function 'nilfs_search_super_root':
       fs/nilfs2/recovery.c:873:11: warning: 'sum' may be used uninitialized in this function [-Wuninitialized]
      
      Another similar warning is reported in
       http://kisskb.ellerman.id.au/kisskb/buildresult/12520079/
      
         CC      fs/nilfs2/btree.o
       fs/nilfs2/btree.c: In function 'nilfs_btree_convert_and_insert':
       include/asm-generic/bitops/non-atomic.h:105:20: warning: 'bh' may be used uninitialized in this function [-Wuninitialized]
       fs/nilfs2/btree.c:1859:22: note: 'bh' was declared here
      
      This cleans out these warnings by forcing the variables to be initialized.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4f05028f
    • Ryusuke Konishi's avatar
      nilfs2: fix gcc unused-but-set-variable warnings · 09ef29e0
      Ryusuke Konishi authored
      Fix the following build warnings:
      
       $ make W=1
       [...]
         CC [M]  fs/nilfs2/btree.o
       fs/nilfs2/btree.c: In function 'nilfs_btree_split':
       fs/nilfs2/btree.c:923:8: warning: variable 'newptr' set but not used [-Wunused-but-set-variable]
         __u64 newptr;
               ^
       fs/nilfs2/btree.c:922:8: warning: variable 'newkey' set but not used [-Wunused-but-set-variable]
         __u64 newkey;
               ^
         CC [M]  fs/nilfs2/dat.o
       fs/nilfs2/dat.c: In function 'nilfs_dat_prepare_end':
       fs/nilfs2/dat.c:158:8: warning: variable 'start' set but not used [-Wunused-but-set-variable]
         __u64 start;
               ^
         CC [M]  fs/nilfs2/segment.o
       fs/nilfs2/segment.c: In function 'nilfs_segctor_do_immediate_flush':
       fs/nilfs2/segment.c:2433:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
         int err;
             ^
         CC [M]  fs/nilfs2/sufile.o
       fs/nilfs2/sufile.c: In function 'nilfs_sufile_alloc':
       fs/nilfs2/sufile.c:320:27: warning: variable 'ncleansegs' set but not used [-Wunused-but-set-variable]
         unsigned long nsegments, ncleansegs, nsus, cnt;
                                  ^
         CC [M]  fs/nilfs2/alloc.o
       fs/nilfs2/alloc.c: In function 'nilfs_palloc_prepare_alloc_entry':
       fs/nilfs2/alloc.c:478:38: warning: variable 'groups_per_desc_block' set but not used [-Wunused-but-set-variable]
         unsigned long n, entries_per_group, groups_per_desc_block;
                                             ^
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      09ef29e0
  2. 05 May, 2015 1 commit
  3. 17 Apr, 2015 1 commit
  4. 28 Feb, 2015 1 commit
    • Ryusuke Konishi's avatar
      nilfs2: fix potential memory overrun on inode · 957ed60b
      Ryusuke Konishi authored
      Each inode of nilfs2 stores a root node of a b-tree, and it turned out to
      have a memory overrun issue:
      
      Each b-tree node of nilfs2 stores a set of key-value pairs and the number
      of them (in "bn_nchildren" member of nilfs_btree_node struct), as well as
      a few other "bn_*" members.
      
      Since the value of "bn_nchildren" is used for operations on the key-values
      within the b-tree node, it can cause memory access overrun if a large
      number is incorrectly set to "bn_nchildren".
      
      For instance, nilfs_btree_node_lookup() function determines the range of
      binary search with it, and too large "bn_nchildren" leads
      nilfs_btree_node_get_key() in that function to overrun.
      
      As for intermediate b-tree nodes, this is prevented by a sanity check
      performed when each node is read from a drive, however, no sanity check
      has been done for root nodes stored in inodes.
      
      This patch fixes the issue by adding missing sanity check against b-tree
      root nodes so that it's called when on-memory inodes are read from ifile,
      inode metadata file.
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      957ed60b
  5. 11 Jun, 2011 2 commits
  6. 10 May, 2011 1 commit
  7. 07 Mar, 2011 1 commit
  8. 22 Jul, 2010 15 commits
  9. 09 May, 2010 3 commits
  10. 02 Apr, 2010 1 commit
  11. 28 Nov, 2009 1 commit
  12. 19 Nov, 2009 4 commits
  13. 14 Sep, 2009 3 commits
  14. 10 Jun, 2009 4 commits