don't hold spin lock across free
This commit is contained in:
parent
227ca25786
commit
c9a425bae3
@ -302,11 +302,11 @@ evtchn_close(struct cdev *dev, int flag, int otyp, struct thread *td __unused)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
mtx_lock_spin(&lock);
|
|
||||||
if (ring != NULL) {
|
if (ring != NULL) {
|
||||||
free(ring, M_DEVBUF);
|
free(ring, M_DEVBUF);
|
||||||
ring = NULL;
|
ring = NULL;
|
||||||
}
|
}
|
||||||
|
mtx_lock_spin(&lock);
|
||||||
for ( i = 0; i < NR_EVENT_CHANNELS; i++ )
|
for ( i = 0; i < NR_EVENT_CHANNELS; i++ )
|
||||||
if ( synch_test_and_clear_bit(i, &bound_ports[0]) )
|
if ( synch_test_and_clear_bit(i, &bound_ports[0]) )
|
||||||
mask_evtchn(i);
|
mask_evtchn(i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user