On Tue, Dec 20, 2016 at 06:47:31PM +0100, Mike Belopuhov wrote:
> @@ -1109,11 +1115,16 @@ if_clone_destroy(const char *name)
>               s = splnet();
>               if_down(ifp);
>               splx(s);
>       }
>  
> -     return ((*ifc->ifc_destroy)(ifp));
> +     /* XXXSMP breaks atomicity */
> +     rw_exit_write(&netlock);
> +     ret = (*ifc->ifc_destroy)(ifp);
> +     rw_enter_write(&netlock);
> +
> +     return (ret);
>  }

This broke pflow again.

panic: netlock: lock not held
Stopped at      Debugger+0x7:   leave
   TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
*440943   4323      0         0x2          0    1  ifconfig
Debugger(d09facfd,f57a2ca8,d09d23c6,f57a2ca8,d76fd000) at Debugger+0x7
panic(d09d23c6,d09dc32f,f57a2cec,d76fd000,0) at panic+0x71
rw_assert_wrlock(d0b56f38,40,f57a2cec,d03e506b,d8e1eb00) at rw_assert_wrlock+0x
3d
rw_exit_write(d0b56f38,0,7a2d4c,d046b949,d76fd000) at rw_exit_write+0x19
pflow_clone_destroy(d76fd000,0,c0186943,d055d8ed,d96ad7a0) at pflow_clone_destr
oy+0x71
if_clone_destroy(f57a2e74,0,d76fd000,1,d76fd000) at if_clone_destroy+0x7b
ifioctl(d9587648,80206979,f57a2e74,d97e22d8,d956d26c) at ifioctl+0x1ed
soo_ioctl(d96405a8,80206979,f57a2e74,d97e22d8,d97b1f64) at soo_ioctl+0x21c
sys_ioctl(d97e22d8,f57a2f5c,f57a2f7c,0,f57a2fa8) at sys_ioctl+0x19f
syscall() at syscall+0x250
--- syscall (number 9) ---
0x14:
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports.  Insufficient info makes it difficult to find and fix bugs.
ddb{1}> 

Now we have two conflicting XXXSMP workarounds in if_clone_destroy()
and pflow_clone_destroy().

bluhm

Reply via email to