summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2005-03-27 23:16:17 +0000
committergreen <green@FreeBSD.org>2005-03-27 23:16:17 +0000
commit3099929dde6a3fd73b24772266fd630afa44408e (patch)
tree68b5167ed118a2943a67005983d2e17411436a29 /sys/net/bpf.c
parent225da24b06256ad94361f2d6a1ef39a5b4a398ed (diff)
downloadFreeBSD-src-3099929dde6a3fd73b24772266fd630afa44408e.zip
FreeBSD-src-3099929dde6a3fd73b24772266fd630afa44408e.tar.gz
You must selwakeup{,pri}() when closing a selectable object or the
td->td_sel will get trashed and crash the system. Fix BPF's mistake in this area. MFC after: 1 day
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 3964d1d..7708504 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -386,6 +386,7 @@ bpfclose(dev, flags, fmt, td)
if (d->bd_bif)
bpf_detachd(d);
mtx_unlock(&bpf_mtx);
+ selwakeuppri(&d->bd_sel, PRINET);
#ifdef MAC
mac_destroy_bpfdesc(d);
#endif /* MAC */
OpenPOWER on IntegriCloud