1. 05 Apr, 2011 2 commits
    • Tao Ma's avatar
      ext4: init timer earlier to avoid a kernel panic in __save_error_info · 04496411
      Tao Ma authored
      During mount, when we fail to open journal inode or root inode, the
      __save_error_info will mod_timer. But actually s_err_report isn't
      initialized yet and the kernel oops. The detailed information can
      be found https://bugzilla.kernel.org/show_bug.cgi?id=32082.
      
      The best way is to check whether the timer s_err_report is initialized
      or not. But it seems that in include/linux/timer.h, we can't find a
      good function to check the status of this timer, so this patch just
      move the initializtion of s_err_report earlier so that we can avoid
      the kernel panic. The corresponding del_timer is also added in the
      error path.
      Reported-by: default avatarSami Liedes <sliedes@cc.hut.fi>
      Signed-off-by: default avatarTao Ma <boyu.mt@taobao.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      04496411
    • Zhang Huan's avatar
      jbd2: fix potential memory leak on transaction commit · 6cba611e
      Zhang Huan authored
      There is potential memory leak of journal head in function
      jbd2_journal_commit_transaction. The problem is that JBD2 will not
      reclaim the journal head of commit record if error occurs or journal
      is abotred.
      
      I use the following script to reproduce this issue, on a RHEL6
      system. I found it very easy to reproduce with async commit enabled.
      
      mount /dev/sdb /mnt -o journal_checksum,journal_async_commit
      touch /mnt/xxx
      echo offline > /sys/block/sdb/device/state
      sync
      umount /mnt
      rmmod ext4
      rmmod jbd2
      
      Removal of the jbd2 module will make slab complaining that
      "cache `jbd2_journal_head': can't free all objects".
      Signed-off-by: default avatarZhang Huan <zhhuan@gmail.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      6cba611e
  2. 04 Apr, 2011 4 commits
  3. 29 Mar, 2011 34 commits