don't hold spin lock across free

This commit is contained in:
Kip Macy 2010-02-21 01:12:18 +00:00
parent 227ca25786
commit c9a425bae3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204159

View File

@ -302,11 +302,11 @@ evtchn_close(struct cdev *dev, int flag, int otyp, struct thread *td __unused)
{
int i;
mtx_lock_spin(&lock);
if (ring != NULL) {
free(ring, M_DEVBUF);
ring = NULL;
}
mtx_lock_spin(&lock);
for ( i = 0; i < NR_EVENT_CHANNELS; i++ )
if ( synch_test_and_clear_bit(i, &bound_ports[0]) )
mask_evtchn(i);