svn commit: r334146 - head/sys/dev/xen/evtchn
Roger Pau Monné
royger at FreeBSD.org
Thu May 24 10:20:44 UTC 2018
Author: royger
Date: Thu May 24 10:20:42 2018
New Revision: 334146
URL: https://svnweb.freebsd.org/changeset/base/334146
Log:
xen/evtchn: fix LOR in evtchn device
Remove the device from the list before unbinding it. Doing it in this
order allows calling xen_intr_unbind without holding the bind_mutex
lock.
Sponsored by: Citrix Systems R&D
Modified:
head/sys/dev/xen/evtchn/evtchn_dev.c
Modified: head/sys/dev/xen/evtchn/evtchn_dev.c
==============================================================================
--- head/sys/dev/xen/evtchn/evtchn_dev.c Thu May 24 10:19:54 2018 (r334145)
+++ head/sys/dev/xen/evtchn/evtchn_dev.c Thu May 24 10:20:42 2018 (r334146)
@@ -474,10 +474,10 @@ evtchn_ioctl(struct cdev *dev, unsigned long cmd, cadd
error = ENOTCONN;
break;
}
-
- xen_intr_unbind(&evtchn->handle);
RB_REMOVE(evtchn_tree, &u->evtchns, evtchn);
mtx_unlock(&u->bind_mutex);
+
+ xen_intr_unbind(&evtchn->handle);
free(evtchn, M_EVTCHN);
error = 0;
break;
More information about the svn-src-head
mailing list