Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 2010 01:12:18 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204159 - head/sys/xen/evtchn
Message-ID:  <201002210112.o1L1CIkE073143@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Sun Feb 21 01:12:18 2010
New Revision: 204159
URL: http://svn.freebsd.org/changeset/base/204159

Log:
  don't hold spin lock across free

Modified:
  head/sys/xen/evtchn/evtchn_dev.c

Modified: head/sys/xen/evtchn/evtchn_dev.c
==============================================================================
--- head/sys/xen/evtchn/evtchn_dev.c	Sun Feb 21 01:11:39 2010	(r204158)
+++ head/sys/xen/evtchn/evtchn_dev.c	Sun Feb 21 01:12:18 2010	(r204159)
@@ -302,11 +302,11 @@ evtchn_close(struct cdev *dev, int flag,
 {
 	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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002210112.o1L1CIkE073143>