[svn-commits] fjoe: freebsd/trunk r8604 - /freebsd/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue May 4 09:15:18 CDT 2010


Author: fjoe
Date: Tue May  4 09:15:14 2010
New Revision: 8604

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8604
Log:
list_for_each_entry_rcu() should be safe for deletions from the list.

Modified:
    freebsd/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c

Modified: freebsd/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c?view=diff&rev=8604&r1=8603&r2=8604
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_dynamic_ethmf.c Tue May  4 09:15:14 2010
@@ -172,7 +172,8 @@
 
 #define list_add_rcu(e, l)			list_add(e, l)
 #define list_del_rcu(e)				list_del(e)
-#define list_for_each_entry_rcu(e, l, elem)	list_for_each_entry(e, l, elem)
+#define _list_temp(e)				__CONCAT(e##_tmp_, __LINE__)
+#define list_for_each_entry_rcu(e, l, elem)	__typeof__(e) _list_temp(e); list_for_each_entry_safe(e, _list_temp(e), l, elem)
 #endif /* __FreeBSD__ */
 
 /**




More information about the svn-commits mailing list