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
This commit is contained in:
parent
e2e4a0e02a
commit
791ca5907a
@ -474,10 +474,10 @@ evtchn_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg,
|
|||||||
error = ENOTCONN;
|
error = ENOTCONN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
xen_intr_unbind(&evtchn->handle);
|
|
||||||
RB_REMOVE(evtchn_tree, &u->evtchns, evtchn);
|
RB_REMOVE(evtchn_tree, &u->evtchns, evtchn);
|
||||||
mtx_unlock(&u->bind_mutex);
|
mtx_unlock(&u->bind_mutex);
|
||||||
|
|
||||||
|
xen_intr_unbind(&evtchn->handle);
|
||||||
free(evtchn, M_EVTCHN);
|
free(evtchn, M_EVTCHN);
|
||||||
error = 0;
|
error = 0;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user