Long chain of calls starting with bridge_on(), going through IPv6, and

ending up at ifa_ifwithdstaddr() could lead to a recursive lock of
the ifnet list mutex.
This commit is contained in:
Jeffrey Hsu 2002-12-27 00:24:35 +00:00
parent 5ab413bf6e
commit c919b1e24b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108298

View File

@ -411,7 +411,8 @@ struct ifmultiaddr {
} while (0)
extern struct mtx ifnet_lock;
#define IFNET_LOCK_INIT() mtx_init(&ifnet_lock, "ifnet", NULL, MTX_DEF)
#define IFNET_LOCK_INIT() \
mtx_init(&ifnet_lock, "ifnet", NULL, MTX_DEF | MTX_RECURSE)
#define IFNET_WLOCK() mtx_lock(&ifnet_lock)
#define IFNET_WUNLOCK() mtx_unlock(&ifnet_lock)
#define IFNET_RLOCK() IFNET_WLOCK()