Thread (19 messages) 19 messages, 4 authors, 2021-12-08

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

From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Date: 2021-11-29 10:38:53

On 2021/11/29 19:21, Christoph Hellwig wrote:
On Sun, Nov 28, 2021 at 04:42:35PM +0900, Tetsuo Handa wrote:
quoted
Is dropping disk->open_mutex inside lo_release()
( https://lkml.kernel.org/r/e4bdc6b1-701d-6cc1-5d42-65564d2aa089@I-love.SAKURA.ne.jp ) 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help