summaryrefslogtreecommitdiffstats
path: root/tools/io_uring/io_uring-bench.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2020-04-21 10:54:45 +0200
committerTheodore Ts'o <tytso@mit.edu>2020-06-04 05:16:49 +0200
commitceff86fddae8748fe00d4f2d249cb02cae62ad84 (patch)
treea1e650ad7d90a72bbe0363076f715b188463989b /tools/io_uring/io_uring-bench.c
parentwriteback: Export inode_io_list_del() (diff)
downloadlinux-ceff86fddae8748fe00d4f2d249cb02cae62ad84.tar.xz
linux-ceff86fddae8748fe00d4f2d249cb02cae62ad84.zip
ext4: Avoid freeing inodes on dirty list
When we are evicting inode with journalled data, we may race with transaction commit in the following way: CPU0 CPU1 jbd2_journal_commit_transaction() evict(inode) inode_io_list_del() inode_wait_for_writeback() process BJ_Forget list __jbd2_journal_insert_checkpoint() __jbd2_journal_refile_buffer() __jbd2_journal_unfile_buffer() if (test_clear_buffer_jbddirty(bh)) mark_buffer_dirty(bh) __mark_inode_dirty(inode) ext4_evict_inode(inode) frees the inode This results in use-after-free issues in the writeback code (or the assertion added in the previous commit triggering). Fix the problem by removing inode from writeback lists once all the page cache is evicted and so inode cannot be added to writeback lists again. Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20200421085445.5731-4-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tools/io_uring/io_uring-bench.c')
0 files changed, 0 insertions, 0 deletions