On Mon, Jan 09, 2017 at 05:48:17PM +0100, Martin Pieuchot wrote:
>  bpf_detachd(struct bpf_d *d)
>  {
> -     struct bpf_if *bp;
> +     struct bpf_if *bp = d->bd_bif;
> +
> +     MUTEX_ASSERT_LOCKED(&d->bd_mtx);
>  
> -     bp = d->bd_bif;
>       /* Not attached. */
>       if (bp == NULL)
>               return;

Why do you reorder the code and assign bp = d->bd_bif before the
mutex assert?  Why not just put the assert in?

OK bluhm@

Reply via email to