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
;> >> 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 58589 0

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

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Alexander Bluhm
} > > NET_LOCK(); > PF_LOCK(); > 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 > >

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Klemens Nanni
+ } That looks right in itself since pfioctl() graps pfioctl_rw early on and these returns fail to release it in case no transaction was found. > > NET_LOCK(); > PF_LOCK(); > On Wed, Jun 28, 2023 at 02:38:00PM +0200, Alexander Bluhm wrote: &

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

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

Re: panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Alexandr Nedvedicky
ests panic the kernel. > > panic: rw_enter: pfioctl_rw locking against myself > Stopped at db_enter+0x14: popq%rbp > TIDPIDUID PRFLAGS PFLAGS CPU COMMAND > * 19846 58589 0 0x2 01K pfctl > 343161 43899 0 0x2

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 C

panic: rw_enter: pfioctl_rw locking against myself

2023-06-28 Thread Alexander Bluhm
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 58589 0 0x2 01K pfctl 343161 43899 0 0x2