Re: [PATCH] loop: don't call vfs_flush() with queue frozen

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

 



On Wed, Jan 15, 2025 at 10:37:08AM +0800, Ming Lei wrote:
> Actually some FSs may call kmalloc(GFP_KERNEL) with i_rwsem grabbed,
> which could call into real deadlock if IO on the loop disk is caused by
> the kmalloc(GFP_KERNEL).

Well, loop can always deadlock when the lower fs is doing allocations,
even without the freeze.  I'm actually kinda surprised loop doesn't
force a context noio as we'd really need that.

> > > because we're talking about different file systems instances.  The only
> > > exception would be file systems taking global locks in the I/O path,
> > > but I sincerely hope no one does that.
> >  
> > Didn't you see the report on fs_reclaim and sysfs root lock?
> > 
> > https://lore.kernel.org/linux-block/197b07435a736825ab40dab8d91db031c7fce37e.camel@xxxxxxxxxxxxxxx/
> 
> There are more, such as mm->mmap_lock[1], hfs SB 'cat_tree' lock[2]...
> 
> 
> [1] https://lore.kernel.org/linux-block/67863050.050a0220.216c54.006f.GAE@xxxxxxxxxx/
> [2] https://lore.kernel.org/linux-block/67582202.050a0220.a30f1.01cb.GAE@xxxxxxxxxx/

And all of these are caused by not breaking the dependency loop..





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux