From: Alexander Bluhm Subject: Re: Don't send route messages while rebooting after panic To: Vitaliy Makkoveev Cc: tech@openbsd.org Date: Mon, 5 Feb 2024 19:15:00 +0100 https://syzkaller.appspot.com/bug?extid=d19060a65721eb432a72 shows that after a panic if_downall() tries to send routing messages. That panics again in knote locking. Noone needs routing messages during panic reboot. OK bluhm@ On Mon, Feb 05, 2024 at 09:09:36PM +0300, Vitaliy Makkoveev wrote: > Index: sys/net/if.c > =================================================================== > RCS file: /cvs/src/sys/net/if.c,v > retrieving revision 1.716 > diff -u -p -r1.716 if.c > --- sys/net/if.c 6 Jan 2024 11:42:11 -0000 1.716 > +++ sys/net/if.c 5 Feb 2024 18:07:34 -0000 > @@ -1788,8 +1788,10 @@ if_linkstate(struct ifnet *ifp) > { > NET_ASSERT_LOCKED(); > > - rtm_ifchg(ifp); > - rt_if_track(ifp); > + if (panicstr != NULL) { > + rtm_ifchg(ifp); > + rt_if_track(ifp); > + } > > if_hooks_run(&ifp->if_linkstatehooks); > }