diff options
| author | Jan Kara <[email protected]> | 2018-11-08 14:01:13 +0100 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2018-11-08 06:30:31 -0700 |
| commit | 85b0a54a82e4fbceeb1aebb7cb6909edd1a24668 (patch) | |
| tree | 81274ef096cbf44b6ff4a706e0c92206da84cf9e /tools/perf/scripts/python | |
| parent | d57f3374ba4817f7c8d26fae8a13d20ac8d31b92 (diff) | |
loop: Move loop_reread_partitions() out of loop_ctl_mutex
Calling loop_reread_partitions() under loop_ctl_mutex causes lockdep to
complain about circular lock dependency between bdev->bd_mutex and
lo->lo_ctl_mutex. The problem is that on loop device open or close
lo_open() and lo_release() get called with bdev->bd_mutex held and they
need to acquire loop_ctl_mutex. OTOH when loop_reread_partitions() is
called with loop_ctl_mutex held, it will call blkdev_reread_part() which
acquires bdev->bd_mutex. See syzbot report for details [1].
Move all calls of loop_rescan_partitions() out of loop_ctl_mutex to
avoid lockdep warning and fix deadlock possibility.
[1] https://syzkaller.appspot.com/bug?id=bf154052f0eea4bc7712499e4569505907d1588
Reported-by: syzbot <syzbot+4684a000d5abdade83fac55b1e7d1f935ef1936e@syzkaller.appspotmail.com>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions