summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-06-20 20:17:29 +0000
committerrwatson <rwatson@FreeBSD.org>2004-06-20 20:17:29 +0000
commit6da2beab7f95422c9010755a8330c9551705260e (patch)
treeb1d1eb597c6a4ed93e46a6055e5f5f51d8e8ef72
parentc2888023eb9044c40a00bc477f834d323e9f8c44 (diff)
downloadFreeBSD-src-6da2beab7f95422c9010755a8330c9551705260e.zip
FreeBSD-src-6da2beab7f95422c9010755a8330c9551705260e.tar.gz
Assert the inpcb lock before letting MAC check whether we can deliver
to the inpcb in tcp_input().
-rw-r--r--sys/netinet/tcp_input.c1
-rw-r--r--sys/netinet/tcp_reass.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 9b6636b..b1b2284 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -750,6 +750,7 @@ findpcb:
tiwin = th->th_win;
#ifdef MAC
+ INP_LOCK_ASSERT(inp);
if (mac_check_inpcb_deliver(inp, m))
goto drop;
#endif
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 9b6636b..b1b2284 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -750,6 +750,7 @@ findpcb:
tiwin = th->th_win;
#ifdef MAC
+ INP_LOCK_ASSERT(inp);
if (mac_check_inpcb_deliver(inp, m))
goto drop;
#endif
OpenPOWER on IntegriCloud