Hello,
commit 310ca162d77 "block/loop: Use global lock for ioctl() operation." has been pushed to multiple stable trees. This patch is a part of larger series that overhauls the locking inside loopback device upstream and for 4.4, 4.9, and 4.14 stable trees only this patch from the series is applied. Our testing now has shown [1] that the patch alone makes present deadlocks inside loopback driver more likely (the openqa test in our infrastructure didn't hit the deadlock before whereas with the new kernel it hits it reliably every time). So I would suggest we revert 310ca162d77 from 4.4, 4.9, and 4.14 kernels.
Another option would be to backport other locking fixes for the loop device but honestly I don't think that's a stable material - never heard of real users hitting problems, only syzkaller could, and we are still fixing up some small glitches resulting from that rework...
Honza
[1] https://bugzilla.suse.com/show_bug.cgi?id=1129739