Re: loop_clone_destroy: read ifnetlist/rdomain with shared net lock

2022-10-21 Thread Vitaliy Makkoveev
On Fri, Oct 21, 2022 at 12:14:16PM +, Klemens Nanni wrote: > On Fri, Oct 21, 2022 at 03:02:33PM +0300, Vitaliy Makkoveev wrote: > > netlock could be completely dropped here. > > We could probably drop the net lock around ifnetlist wherever the kernel > lock is currently held, but that would ju

Re: loop_clone_destroy: read ifnetlist/rdomain with shared net lock

2022-10-21 Thread Klemens Nanni
On Fri, Oct 21, 2022 at 03:02:33PM +0300, Vitaliy Makkoveev wrote: > netlock could be completely dropped here. We could probably drop the net lock around ifnetlist wherever the kernel lock is currently held, but that would just make it harder to reason about ifnetlist locking, imho. Eventually, t

Re: loop_clone_destroy: read ifnetlist/rdomain with shared net lock

2022-10-21 Thread Vitaliy Makkoveev
On Fri, Oct 21, 2022 at 10:28:04AM +, Klemens Nanni wrote: > All interface ioctls always run with the kernel lock anyway, so this > doesn't make a difference, except that it reflects how ifnetlist is not > modified. > > OK? > netlock could be completely dropped here. > diff --git a/sys/net/

loop_clone_destroy: read ifnetlist/rdomain with shared net lock

2022-10-21 Thread Klemens Nanni
All interface ioctls always run with the kernel lock anyway, so this doesn't make a difference, except that it reflects how ifnetlist is not modified. OK? diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index a15820420ef..16006c4c102 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -2