29.05.2019 3:10, Gleb Smirnoff пишет: > Hi Andrey, > > I made a different change to mitigate this panic: don't clear the pointer. > > --- a/FreeBSD/sys/net/bpf.c > +++ b/FreeBSD/sys/net/bpf.c > @@ -857,7 +857,6 @@ bpf_detachd_locked(struct bpf_d *d, bool detached_ifp) > /* Save bd_writer value */ > error = d->bd_writer; > ifp = bp->bif_ifp; > - d->bd_bif = NULL; > if (detached_ifp) { > /* > * Notify descriptor as it's detached, so that any > > Since every bpf_d holds a reference on bpf_if until delayed free happens, > the the bpf_if is going to be valid. > > This allows not to use epoch_wait and run fully async. The patch above is > a minimal patch: with NULL assignment removed, several more pieces of code > can be removed in bpf.c > > Of course your patch also is going to work, but what do you think: > are there any landmines with fully async approach?
Hi, bpf_mtap() is not the only consumer of bd_bif, some of them expect it becomes NULL when descriptor is detached. -- WBR, Andrey V. Elsukov _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"