]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
xen-blkback: don't unbind the interrupt while holding the lock
authorroyger <royger@FreeBSD.org>
Thu, 24 May 2018 10:19:54 +0000 (10:19 +0000)
committerroyger <royger@FreeBSD.org>
Thu, 24 May 2018 10:19:54 +0000 (10:19 +0000)
commit2fc358d119eb1d905a899730584e180d21e8f924
treee221f5232a7f1916d630533a6a269b3163559d67
parent6cf2249c03bf1e38ff675297b4c8f860d24c0800
xen-blkback: don't unbind the interrupt while holding the lock

There's no need to perform the interrupt unbind while holding the
blkback lock, and doing so leads to the following LOR:

lock order reversal: (sleepable after non-sleepable)
 1st 0xfffff8000802fe90 xbbd1 (xbbd1) @ /usr/src/sys/dev/xen/blkback/blkback.c:3423
 2nd 0xffffffff81fdf890 intrsrc (intrsrc) @ /usr/src/sys/x86/x86/intr_machdep.c:224
stack backtrace:
#0 0xffffffff80bdd993 at witness_debugger+0x73
#1 0xffffffff80bdd814 at witness_checkorder+0xe34
#2 0xffffffff80b7d798 at _sx_xlock+0x68
#3 0xffffffff811b3913 at intr_remove_handler+0x43
#4 0xffffffff811c63ef at xen_intr_unbind+0x10f
#5 0xffffffff80a12ecf at xbb_disconnect+0x2f
#6 0xffffffff80a12e54 at xbb_shutdown+0x1e4
#7 0xffffffff80a10be4 at xbb_frontend_changed+0x54
#8 0xffffffff80ed66a4 at xenbusb_back_otherend_changed+0x14
#9 0xffffffff80a2a382 at xenwatch_thread+0x182
#10 0xffffffff80b34164 at fork_exit+0x84
#11 0xffffffff8101ec9e at fork_trampoline+0xe

Reported by:    Nathan Friess <nathan.friess@gmail.com>
Sponsored by:   Citrix Systems R&D
sys/dev/xen/blkback/blkback.c