Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 May 2020 22:02:49 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360641 - head/sys/netinet/tcp_stacks
Message-ID:  <202005042202.044M2nQE021598@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Mon May  4 22:02:49 2020
New Revision: 360641
URL: https://svnweb.freebsd.org/changeset/base/360641

Log:
  Enter the net epoch before calling the output routine in TCP BBR.
  This was only triggered when setting the IPPROTO_TCP level socket
  option TCP_DELACK.
  This issue was found by runnning an instance of SYZKALLER.
  Reviewed by:		rrs
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D24690

Modified:
  head/sys/netinet/tcp_stacks/bbr.c

Modified: head/sys/netinet/tcp_stacks/bbr.c
==============================================================================
--- head/sys/netinet/tcp_stacks/bbr.c	Mon May  4 21:09:35 2020	(r360640)
+++ head/sys/netinet/tcp_stacks/bbr.c	Mon May  4 22:02:49 2020	(r360641)
@@ -14418,6 +14418,7 @@ static int
 bbr_set_sockopt(struct socket *so, struct sockopt *sopt,
 		struct inpcb *inp, struct tcpcb *tp, struct tcp_bbr *bbr)
 {
+	struct epoch_tracker et;
 	int32_t error = 0, optval;
 
 	switch (sopt->sopt_name) {
@@ -14710,7 +14711,9 @@ bbr_set_sockopt(struct socket *so, struct sockopt *sop
 			if (tp->t_flags & TF_DELACK) {
 				tp->t_flags &= ~TF_DELACK;
 				tp->t_flags |= TF_ACKNOW;
+				NET_EPOCH_ENTER(et);
 				bbr_output(tp);
+				NET_EPOCH_EXIT(et);
 			}
 		} else
 			error = EINVAL;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005042202.044M2nQE021598>