Date: Thu, 4 Sep 2003 14:45:16 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 37532 for review Message-ID: <200309042145.h84LjGsx050806@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=37532 Change 37532 by sam@sam_ebb on 2003/09/04 14:44:21 Reduce window during which a race can occur when detaching an interface from each descriptor that references it. This is just a bandaid; the locking here is bogus. Affected files ... .. //depot/projects/netperf/sys/net/bpf.c#5 edit Differences ... ==== //depot/projects/netperf/sys/net/bpf.c#5 (text+ko) ==== @@ -278,7 +278,9 @@ struct bpf_d **p; struct bpf_if *bp; + /* XXX locking */ bp = d->bd_bif; + d->bd_bif = 0; /* * Check if this descriptor had requested promiscuous mode. * If so, turn it off. @@ -310,9 +312,8 @@ /* * Let the driver know that there are no more listeners. */ - *d->bd_bif->bif_driverp = 0; + *bp->bif_driverp = 0; BPFIF_UNLOCK(bp); - d->bd_bif = 0; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309042145.h84LjGsx050806>