On Tue, Apr 18, 2023 at 06:49:39PM +0300, Vitaliy Makkoveev wrote:
> rtable_setsource(... , NULL) actually doesn't destroy object pointed by
> `ar_source', so for this call netlock is not required. However this
> optimisation doesn't produce any visible effect, so no objections to
> call rt_setsou
On Tue, Apr 18, 2023 at 03:15:54PM +0200, Alexander Bluhm wrote:
> On Mon, Apr 17, 2023 at 03:16:36AM +0300, Vitaliy Makkoveev wrote:
> > Index: sys/dev/usb/if_umb.c
> This umb chunk is OK bluhm@
>
> > Index: sys/net/if.c
> > ===
> >
On Mon, Apr 17, 2023 at 03:16:36AM +0300, Vitaliy Makkoveev wrote:
> Index: sys/dev/usb/if_umb.c
> ===
> RCS file: /cvs/src/sys/dev/usb/if_umb.c,v
> retrieving revision 1.50
> diff -u -p -r1.50 if_umb.c
> --- sys/dev/usb/if_umb.c
We use netlock to protect `if_list' and `ifa_list' lists, and the `ifa'
dereference, so kernel lock within ifa_ifwithaddr() is wrong. We have no
problems, because we call ifadel()/ifafree() with kernel lock held, but
we should not rely on this.
So use netlock assertion within ifa_ifwithaddr() inst