On 2015 Jan 18 (Sun) at 14:07:40 +0100 (+0100), Martin Pieuchot wrote:
:Hello Peter,
:
:On 18/01/15(Sun) 13:45, [email protected] wrote:
:> >Synopsis: Crash triggered by ifconfig up on urtwn interface with post
usb3 snapshots
:> >Category: amd64 kernel
:> >Environment:
:> System : OpenBSD 5.7
:> Details : OpenBSD 5.7-beta (GENERIC.MP) #788: Sat Jan 17 07:35:25
MST 2015
:>
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
:>
:> Architecture: OpenBSD.amd64
:> Machine : amd64
:> >Description:
:> After the recent USB changes, my urtwn would lose link significantly
more often than previous. At most times
:> netstart urtwn0 would produce desired effect, however every 5 or 6
times the machine would crash.
:> Photos of the desired post crash output are at
http://www.bsdly.net/~peter/20150118_crash/
:> >How-To-Repeat:
:> amd64 machine with usb3 only ports, no bios option to downshift to
older mode. use urtwn wifi dongle,
:> when link drops, use /etc/netstart to re-establish link. every 5 to 6
times, the system crashes.
:
:Thanks for the bug report. Due to the existing problem with xhci(4) on
:Intel hardware and the fact that urtwn(4) does not bring itself down
:when the interface times out, you're exercising some unusual code path
:in the network stack.
:
:And you found a regression the hard way. Sorry for that, diff below
:should fix it. Well it won't make your urtwn(4) work better, but at
:least it should not panic(9) your kernel.
:
:Index: route.c
:===================================================================
:RCS file: /cvs/src/sys/net/route.c,v
:retrieving revision 1.199
:diff -u -p -r1.199 route.c
:--- route.c 13 Jan 2015 12:14:00 -0000 1.199
:+++ route.c 18 Jan 2015 13:02:00 -0000
:@@ -1045,8 +1045,10 @@ rt_checkgate(struct ifnet *ifp, struct r
:
: if ((rt->rt_flags & RTF_UP) == 0) {
: rt = rtalloc(dst, RT_REPORT|RT_RESOLVE, rtableid);
:+ if (rt == NULL)
:+ return (EHOSTUNREACH);
: rt->rt_refcnt--;
:- if (rt == NULL || rt->rt_ifp != ifp)
:+ if (rt->rt_ifp != ifp)
: return (EHOSTUNREACH);
: }
:
:
OK
--
Immortality -- a fate worse than death.
-- Edgar A. Shoaff