Re: [syzbot] possible deadlock in blkdev_put (2)

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

 



On 2021/11/29 19:21, Christoph Hellwig wrote:
> On Sun, Nov 28, 2021 at 04:42:35PM +0900, Tetsuo Handa wrote:
>> Is dropping disk->open_mutex inside lo_release()
>> ( https://lkml.kernel.org/r/e4bdc6b1-701d-6cc1-5d42-65564d2aa089@xxxxxxxxxxxxxxxxxxx ) possible?
> 
> I don't think we can drop open_mutex inside ->release. What is the
> problem with offloading the clearing to a different context than the
> one that calls ->release?
> 

Offloading to a WQ context?

If the caller just want to call ioctl(LOOP_CTL_GET_FREE) followed by
ioctl(LOOP_CONFIGURE), deferring __loop_clr_fd() would be fine.

But the caller might want to unmount as soon as fput(filp) from __loop_clr_fd() completes.
I think we need to wait for __loop_clr_fd() from lo_release() to complete.



[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