aha/fs/jbd
Jan Kara a61d90d75d jbd: fix race in buffer processing in commit code
In commit code, we scan buffers attached to a transaction.  During this
scan, we sometimes have to drop j_list_lock and then we recheck whether
the journal buffer head didn't get freed by journal_try_to_free_buffers().
 But checking for buffer_jbd(bh) isn't enough because a new journal head
could get attached to our buffer head.  So add a check whether the journal
head remained the same and whether it's still at the same transaction and
list.

This is a nasty bug and can cause problems like memory corruption (use after
free) or trigger various assertions in JBD code (observed).

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: <stable@kernel.org>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-09 16:59:03 -07:00
..
checkpoint.c jbd: don't give up looking for space so easily in __log_wait_for_space 2008-11-06 22:37:59 -05:00
commit.c jbd: fix race in buffer processing in commit code 2009-06-09 16:59:03 -07:00
journal.c jbd: fix oops in jbd_journal_init_inode() on corrupted fs 2009-04-02 19:04:52 -07:00
Kconfig fs/Kconfig: move ext2, ext3, ext4, JBD, JBD2 out 2008-10-20 11:43:59 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
recovery.c jbd: fix error handling for checkpoint io 2008-10-23 08:55:01 -07:00
revoke.c Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 2009-04-24 08:37:40 -07:00
transaction.c ext3: Use WRITE_SYNC for commits which are caused by fsync() 2009-03-27 22:14:27 -04:00