On Tue, Jul 27, 2021 at 10:46:06PM -0700, Krzysztof Olędzki wrote: > So, to confirm - checking for both EINVAL and ENOTTY after LOOP_CONFIGURE is > the proper way of taking care this? > > https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/lib/loopdev.c?id=d4423cce9b9001c9de7ebc6f64f6cc2bb854944c#n1362 We need both to make losetup/mount robust for already released kernels. Fixed: https://github.com/karelzak/util-linux/commit/583990d25b5d65a9a9771a39d112de0ee16a1f3a Thanks for your report! Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com