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:
parent
5ab413bf6e
commit
c919b1e24b
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user