summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2004-11-23 16:06:15 +0000
committerRobert Watson <rwatson@FreeBSD.org>2004-11-23 16:06:15 +0000
commit8263bab34de839819582a8a2372dc943f192f86f (patch)
treea533bbf3efae2c8d996de30bbbf7440a0553f8b5
parent8438db0f5908d424cab76d8fc8b064658d991d24 (diff)
Notes
-rw-r--r--sys/netinet/tcp_subr.c4
-rw-r--r--sys/netinet/tcp_timewait.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index d54b6fac27c8..e3fcdf1ec158 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -646,6 +646,7 @@ tcp_drop(tp, errno)
{
struct socket *so = tp->t_inpcb->inp_socket;
+ INP_LOCK_ASSERT(tp->t_inpcb);
if (TCPS_HAVERCVDSYN(tp->t_state)) {
tp->t_state = TCPS_CLOSED;
(void) tcp_output(tp);
@@ -1373,6 +1374,7 @@ tcp_quench(inp, errno)
{
struct tcpcb *tp = intotcpcb(inp);
+ INP_LOCK_ASSERT(inp);
if (tp != NULL)
tp->snd_cwnd = tp->t_maxseg;
return (inp);
@@ -1390,6 +1392,7 @@ tcp_drop_syn_sent(inp, errno)
{
struct tcpcb *tp = intotcpcb(inp);
+ INP_LOCK_ASSERT(inp);
if (tp != NULL && tp->t_state == TCPS_SYN_SENT) {
tcp_drop(tp, errno);
return (struct inpcb *)0;
@@ -1417,6 +1420,7 @@ tcp_mtudisc(inp, errno)
int isipv6;
#endif /* INET6 */
+ INP_LOCK_ASSERT(inp);
if (tp != NULL) {
#ifdef INET6
isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) != 0;
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index d54b6fac27c8..e3fcdf1ec158 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -646,6 +646,7 @@ tcp_drop(tp, errno)
{
struct socket *so = tp->t_inpcb->inp_socket;
+ INP_LOCK_ASSERT(tp->t_inpcb);
if (TCPS_HAVERCVDSYN(tp->t_state)) {
tp->t_state = TCPS_CLOSED;
(void) tcp_output(tp);
@@ -1373,6 +1374,7 @@ tcp_quench(inp, errno)
{
struct tcpcb *tp = intotcpcb(inp);
+ INP_LOCK_ASSERT(inp);
if (tp != NULL)
tp->snd_cwnd = tp->t_maxseg;
return (inp);
@@ -1390,6 +1392,7 @@ tcp_drop_syn_sent(inp, errno)
{
struct tcpcb *tp = intotcpcb(inp);
+ INP_LOCK_ASSERT(inp);
if (tp != NULL && tp->t_state == TCPS_SYN_SENT) {
tcp_drop(tp, errno);
return (struct inpcb *)0;
@@ -1417,6 +1420,7 @@ tcp_mtudisc(inp, errno)
int isipv6;
#endif /* INET6 */
+ INP_LOCK_ASSERT(inp);
if (tp != NULL) {
#ifdef INET6
isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) != 0;