diff options
author | hsu <hsu@FreeBSD.org> | 2002-12-27 00:24:35 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2002-12-27 00:24:35 +0000 |
commit | da4baeac50574ca93ca24b64d5a9978e22c7c7d0 (patch) | |
tree | 3eda98e95509c3f1493f087fe279aef4b367fe6d /sys/net | |
parent | 516da34ba853095036b78392ecdb96c408955bd6 (diff) | |
download | FreeBSD-src-da4baeac50574ca93ca24b64d5a9978e22c7c7d0.zip FreeBSD-src-da4baeac50574ca93ca24b64d5a9978e22c7c7d0.tar.gz |
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.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_var.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index fa4082b..ebd3e66 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -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() |