Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-29 Thread Alexander Bluhm
On Wed, Jun 28, 2023 at 09:41:15PM +0200, Florian Obser wrote: > Yes, good idea, let's ship 7.4 with the leak! The backout replaced a crash with a leak. We don't want to ship 7.4 with a potential kernel crash either. > I'm getting a bit annoyed with unlocking this and rewriting that and then >

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Florian Obser
Yes, good idea, let's ship 7.4 with the leak! I'm getting a bit annoyed with unlocking this and rewriting that and then complete silence when shit breaks. On 28 June 2023 17:33:01 CEST, Klemens Nanni wrote: >On Wed, Jun 28, 2023 at 02:38:00PM +0200, Alexander Bluhm wrote: >> Hi, >> >> Since Ju

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Klemens Nanni
On Wed, Jun 28, 2023 at 06:17:46PM +0200, Alexandr Nedvedicky wrote: > Hello, > > the fix below solves the locking issue. however pf_close_all_trans() still > breaks the test case. it fails to retrieve all rules. it looks like pfctl(8) > currently opens transaction for every ruleset/anchor it's g

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Alexander Bluhm
On Wed, Jun 28, 2023 at 05:46:36PM +0200, Alexandr Nedvedicky wrote: > it looks like we need to use goto fail instead of return. > this is the diff I'm testing now. OK bluhm@ > 8<---8<---8<--8< > diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Klemens Nanni
On Wed, Jun 28, 2023 at 05:46:36PM +0200, Alexandr Nedvedicky wrote: > Hello, > > it looks like we need to use goto fail instead of return. > this is the diff I'm testing now. > > 8<---8<---8<--8< > diff --git a/sys/net/pf_ioctl.c b/sys/net/

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Claudio Jeker
On Wed, Jun 28, 2023 at 05:46:36PM +0200, Alexandr Nedvedicky wrote: > Hello, > > it looks like we need to use goto fail instead of return. > this is the diff I'm testing now. > > 8<---8<---8<--8< > diff --git a/sys/net/pf_ioctl.c b/sys/net/

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Alexandr Nedvedicky
Hello, the fix below solves the locking issue. however pf_close_all_trans() still breaks the test case. it fails to retrieve all rules. it looks like pfctl(8) currently opens transaction for every ruleset/anchor it's going to retrieve. the ruleset in question reads as follows: netlock# cat

Re: [External] : Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Alexandr Nedvedicky
Hello, On Wed, Jun 28, 2023 at 03:33:01PM +, Klemens Nanni wrote: > On Wed, Jun 28, 2023 at 02:38:00PM +0200, Alexander Bluhm wrote: > > Hi, > > > > Since Jun 26 regress tests panic the kernel. > > > > panic: rw_enter: pfioctl_rw locking against myself > > Stopped at db_enter+0x14: po

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Alexandr Nedvedicky
Hello, it looks like we need to use goto fail instead of return. this is the diff I'm testing now. 8<---8<---8<--8< diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 36779cfdfd3..a51df9e6089 100644 --- a/sys/net/pf_ioctl.c +++ b/sys

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Klemens Nanni
On Wed, Jun 28, 2023 at 02:38:00PM +0200, Alexander Bluhm wrote: > Hi, > > Since Jun 26 regress tests panic the kernel. > > panic: rw_enter: pfioctl_rw locking against myself > Stopped at db_enter+0x14: popq%rbp > TIDPIDUID PRFLAGS PFLAGS CPU COMMAND > * 19846 585