Re: push NET_LOCK() down in pf_ioctl.c

2020-10-20 Thread Klemens Nanni
On Tue, Oct 20, 2020 at 01:49:22AM +0200, Alexandr Nedvedicky wrote: > Currently we need to keep pf_rm_rule() under both locks. The function > might be calling pf_tag_unref(), pf_dynaddr_remove()... which alter lists, > which are currently supposed to be protected by

Re: push NET_LOCK() down in pf_ioctl.c

2020-10-19 Thread Alexandr Nedvedicky
Hello Klemens, > > the change is fairly large, but mostly mechanical. > Relocating malloc(9) and pool(9) seems good but other pf_*() calls are > now locked inconsistently after your diff. > > Given that only reason about "allocations" this is either an oversight > and should be fixed or you

Re: push NET_LOCK() down in pf_ioctl.c

2020-10-17 Thread Klemens Nanni
On Fri, Oct 16, 2020 at 11:37:22AM +0200, Alexandr Nedvedicky wrote: > I've just found a forgotten diff in my tree. The diff pushes the NET_LCOK() > further down in PF driver ioctl() path. The idea is to avoid sleeping while > holding a NET_LOCK(). this typically may happen when we need to

push NET_LOCK() down in pf_ioctl.c

2020-10-16 Thread Alexandr Nedvedicky
Hello, I've just found a forgotten diff in my tree. The diff pushes the NET_LCOK() further down in PF driver ioctl() path. The idea is to avoid sleeping while holding a NET_LOCK(). this typically may happen when we need to allocate memory. The diff is the first step as it takes care of