Re: yet another approach to fix the loop lock order inversions v6
- To: Christoph Hellwig <hch@lst.de>
- Cc: Jan Kara <jack@suse.cz>, Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>, Jens Axboe <axboe@kernel.dk>, Josef Bacik <josef@toxicpanda.com>, Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>, "Darrick J . Wong" <djwong@kernel.org>, Ming Lei <ming.lei@redhat.com>, Matteo Croce <mcroce@microsoft.com>, linux-block@vger.kernel.org, nbd@other.debian.org
- Subject: Re: yet another approach to fix the loop lock order inversions v6
- From: Jan Kara <jack@suse.cz>
- Date: Tue, 5 Apr 2022 11:10:03 +0200
- Message-id: <[🔎] 20220405091003.gmeuhtrwj7nzebyx@quack3.lan>
- In-reply-to: <[🔎] 20220405062838.GA24373@lst.de>
- References: <20220330052917.2566582-1-hch@lst.de> <[🔎] 20220404074235.GA1046@lst.de> <[🔎] 499de381-c81e-4bd0-b5f7-1ee6be45821d@I-love.SAKURA.ne.jp> <[🔎] 20220405062838.GA24373@lst.de>
On Tue 05-04-22 08:28:38, Christoph Hellwig wrote:
> On Mon, Apr 04, 2022 at 06:39:31PM +0900, Tetsuo Handa wrote:
> > Two bugs which Jan has found in /bin/mount might not be yet fixed in
> > versions developers/users are using. Thus, let's wait for a while
> > before committing to linux.git.
>
> Jan, which loop bugs might be relevant here?
So there was a bug in libmount code trying to reuse already setup loop
devices and changes in timing & removing the lo_mutex from lo_open() +
suitable racing with systemd-udev probing devices caused these bugs to
manifest. The visible effect was that a loop like:
while :; do mount -o loop,ro isofs.iso isofs/; umount isofs/; done
often failed with:
mount: /mnt: can't read superblock on /dev/loop0.
umount: /mnt: not mounted.
Bugs are fixed now by commits 3e1fc3bbe ("mount: Fix race in loop device
reuse code"), fb4b6b115 ("loopdev: Properly translate errors from
ul_path_read_*()"), 562990b552 ("loopdev: Do not treat errors when
detecting overlap as fatal") in util-linux git.
The only real-world impact I've heard about was LTP failing due to these
problems and those guys should be capable enough to update their util-linux
when we tell them. So I think we should be OK with pushing the kernel fixes
upstream but it may generate some noise from automated testers before
util-linux is updated on all of them...
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
Reply to: