mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
This fixes missing VNET sets in the hpts system. Basically
without this and running vnets with a TCP stack that uses some of the features is a recipe for panic (without this commit). Reported by: Larry Rosenman Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D15757
This commit is contained in:
1 parent
700e893c34
commit
c9b4ac7587
1 file changed
+4
-3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335022
@@ -1215,7 +1215,9 @@ tcp_input_data(struct tcp_hpts_entry *hpts, struct timeval *tv)
|
||||
hpts->p_inp = inp;
|
||||
drop_reason = inp->inp_hpts_drop_reas;
|
||||
inp->inp_in_input = 0;
|
||||
tp = intotcpcb(inp);
|
||||
mtx_unlock(&hpts->p_mtx);
|
||||
CURVNET_SET(tp->t_vnet);
|
||||
if (drop_reason) {
|
||||
INP_INFO_RLOCK(&V_tcbinfo);
|
||||
ti_locked = TI_RLOCKED;
|
||||
@@ -1234,10 +1236,10 @@ out:
|
||||
INP_WUNLOCK(inp);
|
||||
}
|
||||
ti_locked = TI_UNLOCKED;
|
||||
CURVNET_RESTORE();
|
||||
mtx_lock(&hpts->p_mtx);
|
||||
continue;
|
||||
}
|
||||
tp = intotcpcb(inp);
|
||||
if ((tp == NULL) || (tp->t_inpcb == NULL)) {
|
||||
goto out;
|
||||
}
|
||||
@@ -1262,6 +1264,7 @@ out:
|
||||
}
|
||||
if (in_pcbrele_wlocked(inp) == 0)
|
||||
INP_WUNLOCK(inp);
|
||||
CURVNET_RESTORE();
|
||||
mtx_lock(&hpts->p_mtx);
|
||||
continue;
|
||||
}
|
||||
@@ -1282,7 +1285,6 @@ out:
|
||||
*/
|
||||
tcp_set_hpts(inp);
|
||||
}
|
||||
CURVNET_SET(tp->t_vnet);
|
||||
m = tp->t_in_pkt;
|
||||
n = NULL;
|
||||
if (m != NULL &&
|
||||
@@ -1366,7 +1368,6 @@ out:
|
||||
if (m)
|
||||
n = m->m_nextpkt;
|
||||
}
|
||||
CURVNET_RESTORE();
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user