diff options
author | Eryu Guan <guaneryu@gmail.com> | 2018-03-22 18:41:25 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-03-22 18:41:25 +0300 |
commit | 73fdad00b208b139cf43f3163fbc0f67e4c6047c (patch) | |
tree | df87fefb83a3a4a7a2416dcd08b6ce3c717d7f5e /tools/perf/scripts/python/stat-cpi.py | |
parent | 044e6e3d74a3d7103a0c8a9305dfd94d64000660 (diff) | |
download | linux-73fdad00b208b139cf43f3163fbc0f67e4c6047c.tar.xz |
ext4: protect i_disksize update by i_data_sem in direct write path
i_disksize update should be protected by i_data_sem, by either taking
the lock explicitly or by using ext4_update_i_disksize() helper. But the
i_disksize updates in ext4_direct_IO_write() are not protected at all,
which may be racing with i_disksize updates in writeback path in
delalloc buffer write path.
This is found by code inspection, and I didn't hit any i_disksize
corruption due to this bug. Thanks to Jan Kara for catching this bug and
suggesting the fix!
Reported-by: Jan Kara <jack@suse.cz>
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions