Re: [PATCH v2 1/2] ext4: protect i_disksize update by i_data_sem in direct write path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 12, 2018 at 11:21:55PM +0800, Eryu Guan wrote:
> 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@xxxxxxx>
> Suggested-by: Jan Kara <jack@xxxxxxx>
> Signed-off-by: Eryu Guan <guaneryu@xxxxxxxxx>

Applied, thanks.

					- Ted



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux