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
This commit is contained in:
green 2005-03-27 23:16:17 +00:00
parent 225da24b06
commit 3099929dde

View File

@ -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 */