Re: [PATCH RESEND] fs: fix race condition oops between destroy_inode and writeback_sb_inodes

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

 




On 2020/9/21 18:25, Jan Kara wrote:
On Sat 19-09-20 05:39:23, Shijie Luo wrote:
So 4.18 is rather old and we had several fixes in this area for crashes
similar to the one you show above. The list was likely:

68f23b89067 ("memcg: fix a crash in wb_workfn when a device disappears")

but there were multiple changes before that to bdi logic to fix lifetime
issues when devices are hot-removed.

Thanks for your reply, we checked several fixes in wb_workfn , and finally found

this patch (ceff86fddae8 ext4: Avoid freeing inodes on dirty list) works.

Our fsstress  process randomly uses ioctl interface to set inode with journal data flag, ext4 inode with journal data

flags is possible to be marked dirty and added to writeback lists again.

When locked_inode_to_wb_and_lock_list in __mark_inode_dirty releases inode->i_lock and do not lock

wb->list_lock, simultaneously the inode is evicted and removed from writeback lists, it's possible this

inode will be added to writeback list again. This problem causes inode allocated from slab is still on

writeback list, and may causes crash because destory_inode set inode->wb to be NULL.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux