diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-08-04 18:27:55 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-08-04 18:27:55 +0000 |
commit | bc0c49120545212dcc8b185d81971a000bf866d1 (patch) | |
tree | e4b99b8a567acae135b9150a6a542feb7426731d /sys/netinet/in_pcb.h | |
parent | f7237cd69681ed69392d6f7fb7a0f507980b0673 (diff) | |
download | FreeBSD-src-bc0c49120545212dcc8b185d81971a000bf866d1.zip FreeBSD-src-bc0c49120545212dcc8b185d81971a000bf866d1.tar.gz |
Now that IPv6 performs basic in6pcb and inpcb locking, enable inpcb
lock assertions even if IPv6 is compiled into the kernel. Previously,
inclusion of IPv6 and locking assertions would result in a rapid
assertion failure as IPv6 was not properly locking inpcbs.
Diffstat (limited to 'sys/netinet/in_pcb.h')
-rw-r--r-- | sys/netinet/in_pcb.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index ec38045..d6dfe4d 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -243,16 +243,10 @@ struct inpcbinfo { /* XXX documentation, prefixes */ #define INP_LOCK_DESTROY(inp) mtx_destroy(&(inp)->inp_mtx) #define INP_LOCK(inp) mtx_lock(&(inp)->inp_mtx) #define INP_UNLOCK(inp) mtx_unlock(&(inp)->inp_mtx) -#ifndef INET6 #define INP_LOCK_ASSERT(inp) do { \ mtx_assert(&(inp)->inp_mtx, MA_OWNED); \ NET_ASSERT_GIANT(); \ } while (0) -#else -#define INP_LOCK_ASSERT(inp) do { \ - NET_ASSERT_GIANT(); \ -} while (0) -#endif #define INP_INFO_LOCK_INIT(ipi, d) \ mtx_init(&(ipi)->ipi_mtx, (d), NULL, MTX_DEF | MTX_RECURSE) @@ -260,7 +254,6 @@ struct inpcbinfo { /* XXX documentation, prefixes */ #define INP_INFO_WLOCK(ipi) mtx_lock(&(ipi)->ipi_mtx) #define INP_INFO_RUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_mtx) #define INP_INFO_WUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_mtx) -#ifndef INET6 #define INP_INFO_RLOCK_ASSERT(ipi) do { \ mtx_assert(&(ipi)->ipi_mtx, MA_OWNED); \ NET_ASSERT_GIANT(); \ @@ -269,14 +262,6 @@ struct inpcbinfo { /* XXX documentation, prefixes */ mtx_assert(&(ipi)->ipi_mtx, MA_OWNED); \ NET_ASSERT_GIANT(); \ } while (0) -#else -#define INP_INFO_RLOCK_ASSERT(ipi) do { \ - NET_ASSERT_GIANT(); \ -} while (0) -#define INP_INFO_WLOCK_ASSERT(ipi) do { \ - NET_ASSERT_GIANT(); \ -} while (0) -#endif #define INP_PCBHASH(faddr, lport, fport, mask) \ (((faddr) ^ ((faddr) >> 16) ^ ntohs((lport) ^ (fport))) & (mask)) |