[svn-commits] fjoe: freebsd/trunk r7801 - /freebsd/trunk/drivers/dahdi/dahdi_dynamic.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sat Jan 9 17:16:01 CST 2010
Author: fjoe
Date: Sat Jan 9 17:15:58 2010
New Revision: 7801
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7801
Log:
Fix lock recursion.
Modified:
freebsd/trunk/drivers/dahdi/dahdi_dynamic.c
Modified: freebsd/trunk/drivers/dahdi/dahdi_dynamic.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_dynamic.c?view=diff&rev=7801&r1=7800&r2=7801
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_dynamic.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_dynamic.c Sat Jan 9 17:15:58 2010
@@ -34,6 +34,26 @@
#include <sys/taskqueue.h>
#include <machine/stdarg.h>
+
+#if 0
+static void
+rlprintf(int pps, const char *fmt, ...)
+ __printflike(2, 3);
+
+static void
+rlprintf(int pps, const char *fmt, ...)
+{
+ va_list ap;
+ static struct timeval last_printf;
+ static int count;
+
+ if (ppsratecheck(&last_printf, &count, pps)) {
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ va_end(ap);
+ }
+}
+#endif
#else /* !__FreeBSD__ */
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -902,9 +922,11 @@
zp->next = z->next;
else
dspans = z->next;
- if (!z->usecount)
+ if (!z->usecount) {
+ spin_unlock_irqrestore(&dlock, flags);
dynamic_destroy(z);
- else
+ spin_lock_irqsave(&dlock, flags);
+ } else
z->dead = 1;
} else {
zp = z;
More information about the svn-commits
mailing list