On 22.6.2020. 11:11, Claudio Jeker wrote: > On Sun, Jun 21, 2020 at 08:51:53PM +0200, Hrvoje Popovski wrote: >> Hi all, >> >> with today's snapshot from 21-Jun-2020 09:34 >> OpenBSD 6.7-current (GENERIC.MP) #286: Sun Jun 21 08:51:29 MDT 2020 >> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP >> >> if i do "ifconfig vlan" i'm getting assert >> x3550m4# ifconfig vlan >> vlan100: flags=8splassert: vlan_ioctl: want 2 have 0 >> Starting stack trace... >> vlan_ioctl(ffff800000bb4800,c02069d3,ffff800021f6f5d0) at vlan_ioctl+0x65 >> ifioctl(fffffd8785005668,c02069d3,ffff800021f6f5d0,ffff800021ffb130) at >> ifioctl+0x91c >> soo_ioctl(fffffd8784e6d630,c02069d3,ffff800021f6f5d0,ffff800021ffb130) >> at soo_ioctl+0x171 >> sys_ioctl(ffff800021ffb130,ffff800021f6f6e0,ffff800021f6f740) at >> sys_ioctl+0x2df >> syscall(ffff800021f6f7b0) at syscall+0x389 >> Xsyscall() at Xsyscall+0x128 >> end of kernel >> end trace frame: 0x7f7ffffe53d0, count: 251 >> End of stack trace. >> >> >> with ifconfig bridge0 up everything seems fine but ifconfig bridge0 >> destroy and ifconfig after that get me panic .. >> >> x3550m4# ifconfig >> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> msplassert: vlan_ioctl: >> want 2 have 0 >> Starting stack trace... >> vlan_ioctl(ffff800000bb4800,c02069d3,ffff800021f6f510) at vlan_ioctl+0x65 >> ifioctl(fffffd8785005668,c02069d3,ffff800021f6f510,ffff800021ffb130) at >> ifioctl+0x91c >> soo_ioctl(fffffd8784e6d630,c02069d3,ffff800021f6f510,ffff800021ffb130) >> at soo_ioctl+0x171 >> sys_ioctl(ffff800021ffb130,ffff800021f6f620,ffff800021f6f680) at >> sys_ioctl+0x2df >> syscall(ffff800021f6f6f0) at syscall+0x389 >> Xsyscall() at Xsyscall+0x128 >> end of kernel >> end trace frame: 0x7f7ffffddd20, count: 251 >> End of stack trace. >> tu 32768 >> indexpanic: netlock: lock not held >> Stopped at db_enter+0x10: popq %rbp >> TID PID UID PRFLAGS PFLAGS CPU COMMAND >> *505095 3193 0 0x3 0 3K ifconfig >> db_enter() at db_enter+0x10 >> panic(ffffffff81dbfaab) at panic+0x128 >> rw_exit_write(ffffffff820e6138) at rw_exit_write+0xb5 >> bridge_ioctl(ffff800001754000,c02069d3,ffff800021f6f510) at >> bridge_ioctl+0x42 >> ifioctl(fffffd8785005668,c02069d3,ffff800021f6f510,ffff800021ffb130) at >> ifioctl+0x91c >> soo_ioctl(fffffd8784e6d630,c02069d3,ffff800021f6f510,ffff800021ffb130) >> at soo_ioctl+0x171 >> sys_ioctl(ffff800021ffb130,ffff800021f6f620,ffff800021f6f680) at >> sys_ioctl+0x2df >> syscall(ffff800021f6f6f0) at syscall+0x389 >> Xsyscall() at Xsyscall+0x128 >> end of kernel >> end trace frame: 0x7f7ffffddd20, count: 6 >> https://www.openbsd.org/ddb.html describes the minimum info required in >> bugreports. Insufficient info makes it difficult to find and fix bugs. >> > > This crashes are because of wg(4) calling the interface ioctl handler > without holding the netlock() this is not allowed. > > As a quick fix this diff may work. >
Hi, for some reason i couldn't reproduce panic if i compile kernel with WITNESS and after that with or without your "if.c if_wg.c" commit .... Thank you for fix ...
