1. 12 8月, 2014 1 次提交
    • J
      reiserfs: Fix use after free in journal teardown · 01777836
      Jan Kara 提交于
      If do_journal_release() races with do_journal_end() which requeues
      delayed works for transaction flushing, we can leave work items for
      flushing outstanding transactions queued while freeing them. That
      results in use after free and possible crash in run_timers_softirq().
      
      Fix the problem by not requeueing works if superblock is being shut down
      (MS_ACTIVE not set) and using cancel_delayed_work_sync() in
      do_journal_release().
      
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      01777836
  2. 06 8月, 2014 1 次提交
    • J
      reiserfs: fix corruption introduced by balance_leaf refactor · 27d0e5bc
      Jeff Mahoney 提交于
      Commits f1f007c3 (reiserfs: balance_leaf refactor, pull out
      balance_leaf_insert_left) and cf22df18 (reiserfs: balance_leaf
      refactor, pull out balance_leaf_paste_left) missed that the `body'
      pointer was getting repositioned. Subsequent users of the pointer
      would expect it to be repositioned, and as a result, parts of the
      tree would get overwritten. The most common observed corruption
      is indirect block pointers being overwritten.
      
      Since the body value isn't actually used anymore in the called routines,
      we can pass back the offset it should be shifted. We constify the body
      and ih pointers in the balance_leaf as a mostly-free preventative measure.
      
      Cc: <stable@vger.kernel.org> # 3.16
      Reported-and-tested-by: NJeff Chua <jeff.chua.linux@gmail.com>
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      27d0e5bc
  3. 12 6月, 2014 1 次提交
    • A
      ->splice_write() via ->write_iter() · 8d020765
      Al Viro 提交于
      iter_file_splice_write() - a ->splice_write() instance that gathers the
      pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
      it to ->write_iter().  A bunch of simple cases coverted to that...
      
      [AV: fixed the braino spotted by Cyrill]
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8d020765
  4. 11 6月, 2014 1 次提交
  5. 07 6月, 2014 2 次提交
  6. 22 5月, 2014 1 次提交
    • J
      reiserfs: call truncate_setsize under tailpack mutex · 22e7478d
      Jeff Mahoney 提交于
      Prior to commit 0e4f6a79 (Fix reiserfs_file_release()), reiserfs
      truncates serialized on i_mutex. They mostly still do, with the exception
      of reiserfs_file_release. That blocks out other writers via the tailpack
      mutex and the inode openers counter adjusted in reiserfs_file_open.
      
      However, NFS will call reiserfs_setattr without having called ->open, so
      we end up with a race when nfs is calling ->setattr while another
      process is releasing the file. Ultimately, it triggers the
      BUG_ON(inode->i_size != new_file_size) check in maybe_indirect_to_direct.
      
      The solution is to pull the lock into reiserfs_setattr to encompass the
      truncate_setsize call as well.
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJan Kara <jack@suse.cz>
      22e7478d
  7. 15 5月, 2014 1 次提交
  8. 13 5月, 2014 3 次提交
  9. 08 5月, 2014 14 次提交
  10. 07 5月, 2014 15 次提交