linux-kernel-test/fs/jbd2
Zhang Huan 6cba611e60 jbd2: fix potential memory leak on transaction commit
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: Zhang Huan <zhhuan@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-04-05 19:16:20 -04:00
..
checkpoint.c Merge branch 'next' into upstream-merge 2010-10-27 23:44:47 -04:00
commit.c jbd2: fix potential memory leak on transaction commit 2011-04-05 19:16:20 -04:00
journal.c jbd2: move bdget out of critical section 2011-04-04 12:58:12 -04:00
Kconfig Revert "task_struct: make journal_info conditional" 2009-12-17 13:23:24 -08:00
Makefile [PATCH] jbd2: rename jbd2 symbols to avoid duplication of jbd symbols 2006-10-11 11:14:15 -07:00
recovery.c jbd2: move debug message into debug #ifdef 2010-12-18 13:36:33 -05:00
revoke.c remove SWRITE* I/O types 2010-08-18 01:09:01 -04:00
transaction.c jbd2: call __jbd2_log_start_commit with j_state_lock write locked 2011-02-12 08:18:24 -05:00