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
This commit is contained in:
Michael Tuexen 2020-05-04 22:02:49 +00:00
parent 963fb2ad94
commit 7985fd7e76
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360641

View File

@ -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 *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;