1. 06 4月, 2011 2 次提交
    • T
      ext4: init timer earlier to avoid a kernel panic in __save_error_info · 04496411
      Tao Ma 提交于
      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: NSami Liedes <sliedes@cc.hut.fi>
      Signed-off-by: NTao Ma <boyu.mt@taobao.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      04496411
    • Z
      jbd2: fix potential memory leak on transaction commit · 6cba611e
      Zhang Huan 提交于
      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: NZhang Huan <zhhuan@gmail.com>
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      6cba611e
  2. 05 4月, 2011 4 次提交
  3. 29 3月, 2011 3 次提交
  4. 28 3月, 2011 31 次提交