Re: [External] : Re: pf_state_key_link_reverse() is prone to race on parallel forwarding

2021-04-26 Thread Alexander Bluhm
I have oked it. It shoud be commited before network becomes parallel. sasha: Is anything blocking this diff? On Fri, Apr 23, 2021 at 01:01:26AM +0200, Alexandr Nedvedicky wrote: > 8<---8<---8<--8< > diff --git a/sys/net/pf.c b/sys/net/pf.c

Re: [External] : Re: pf_state_key_link_reverse() is prone to race on parallel forwarding

2021-04-23 Thread Alexander Bluhm
On Fri, Apr 23, 2021 at 01:01:26AM +0200, Alexandr Nedvedicky wrote: > sure, updated diff is below. Thanks for analysis. OK bluhm@ > > looks like there must be one more difference between OpenBSD and genua. > It looks like genua-pf is able to run state expiration concurrently with >

Re: [External] : Re: pf_state_key_link_reverse() is prone to race on parallel forwarding

2021-04-22 Thread Alexandr Nedvedicky
Hello, > > + > Can you remove one of the double empty lines? sure, updated diff is below. > > + > > + old_reverse = atomic_cas_ptr(&skrev->reverse, NULL, sk); > > + if (old_reverse != NULL) > > + KASSERT(old_reverse == sk); > > + else > > + pf_state_key_ref(sk); >

Re: pf_state_key_link_reverse() is prone to race on parallel forwarding

2021-04-22 Thread Alexander Bluhm
On Wed, Apr 21, 2021 at 10:19:10PM +0200, Alexandr Nedvedicky wrote: > would it be OK to commit it once bluhm's diff [1] will be in? Diff can be commited independently when we know that it is correct. > 8<---8<---8<--8< > diff --git a/sys/ne

Re: pf_state_key_link_reverse() is prone to race on parallel forwarding

2021-04-22 Thread Hrvoje Popovski
On 21.4.2021. 22:19, Alexandr Nedvedicky wrote: > Hello, > > people who will be running pf(4) with bluhm's diff [1], may trip > one of the asserts triggered by pf_state_key_link_reverse() here: > > 7366 void > 7367 pf_state_key_link_reverse(struct pf_state_key *sk, struct pf_state_key > *skrev)

pf_state_key_link_reverse() is prone to race on parallel forwarding

2021-04-21 Thread Alexandr Nedvedicky
Hello, people who will be running pf(4) with bluhm's diff [1], may trip one of the asserts triggered by pf_state_key_link_reverse() here: 7366 void 7367 pf_state_key_link_reverse(struct pf_state_key *sk, struct pf_state_key *skrev) 7368 { 7369 /* Note that sk and skrev may be equal, then