]> Git Repo - linux.git/commit
loop: make autoclear operation asynchronous
authorTetsuo Handa <[email protected]>
Mon, 13 Dec 2021 12:55:27 +0000 (21:55 +0900)
committerJens Axboe <[email protected]>
Mon, 13 Dec 2021 18:37:31 +0000 (11:37 -0700)
commit322c4293ecc58110227b49d7e47ae37b9b03566f
tree7d80878419583add4b5626aa41c696446814ac48
parentc5eafd790e1317f5bfc69845207f69f6447b4b2b
loop: make autoclear operation asynchronous

syzbot is reporting circular locking problem at __loop_clr_fd() [1], for
commit 87579e9b7d8dc36e ("loop: use worker per cgroup instead of kworker")
is calling destroy_workqueue() with disk->open_mutex held.

This circular dependency cannot be broken unless we call __loop_clr_fd()
without holding disk->open_mutex. Therefore, defer __loop_clr_fd() from
lo_release() to a WQ context.

Link: https://syzkaller.appspot.com/bug?extid=643e4ce4b6ad1347d372
Reported-by: syzbot <[email protected]>
Suggested-by: Christoph Hellwig <[email protected]>
Cc: Jan Kara <[email protected]>
Tested-by: [email protected]
Signed-off-by: Tetsuo Handa <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
drivers/block/loop.c
drivers/block/loop.h
This page took 0.077209 seconds and 4 git commands to generate.