summaryrefslogtreecommitdiff
path: root/sys/arch/armv7/imx
diff options
context:
space:
mode:
authorAlexandr Nedvedicky <sashan@cvs.openbsd.org>2021-06-02 21:49:32 +0000
committerAlexandr Nedvedicky <sashan@cvs.openbsd.org>2021-06-02 21:49:32 +0000
commitf3bce683a87856150610d93f55e4453a1cd21bb2 (patch)
treedf82c2394cfb284b093fab49e5b2c9d9fbb5c018 /sys/arch/armv7/imx
parente611a254c6c9aac6ff3cb0aa396e65cd8748ed8c (diff)
With parallel execution of pf_test() two packets may try to update the same
state in pfsync(4) queue. pfsync_q_ins() takes that race into account with one exception: the KASSERT() at line 2352. That KASSERT() needs to be removed. 2346 void 2347 pfsync_q_ins(struct pf_state *st, int q) 2348 { 2349 struct pfsync_softc *sc = pfsyncif; 2350 size_t nlen, sc_len; 2351 2352 KASSERT(st->sync_state == PFSYNC_S_NONE); 2353 2354 #if defined(PFSYNC_DEBUG) 2355 if (sc->sc_len < PFSYNC_MINPKT) 2356 panic("pfsync pkt len is too low %zd", sc->sc_len); 2357 #endif 2358 do { 2359 mtx_enter(&sc->sc_mtx[q]); 2360 2361 /* 2362 * If two threads are competing to insert the same state, then 2363 * there must be just single winner. 2364 */ 2365 if (st->sync_state != PFSYNC_S_NONE) { 2366 mtx_leave(&sc->sc_mtx[q]); 2367 break; 2368 } OK bluhm@
Diffstat (limited to 'sys/arch/armv7/imx')
0 files changed, 0 insertions, 0 deletions