Skip to content

Commit

Permalink
Enter the net epoch before calling the output routine in TCP BBR.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tuexen committed May 4, 2020
1 parent 963fb2a commit 7985fd7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/netinet/tcp_stacks/bbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -14710,7 +14711,9 @@ bbr_set_sockopt(struct socket *so, struct sockopt *sopt,
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;
Expand Down

0 comments on commit 7985fd7

Please sign in to comment.