Don't recurse the BPF descriptor lock during the BIOCSDLT operation
(and panic). To try to finish making BPF safe, at the very least, the BPF descriptor lock really needs to change into a reader/writer lock that controls access to "settings," and a mutex that controls access to the selinfo/knote/callout. Also, use of callout_drain() instead of callout_stop() (which is really a much more widespread issue).
This commit is contained in:
parent
6f9e3ebf47
commit
93daabdd83
@ -1558,10 +1558,10 @@ bpf_setdlt(d, dlt)
|
||||
}
|
||||
mtx_unlock(&bpf_mtx);
|
||||
if (bp != NULL) {
|
||||
BPFD_LOCK(d);
|
||||
opromisc = d->bd_promisc;
|
||||
bpf_detachd(d);
|
||||
bpf_attachd(d, bp);
|
||||
BPFD_LOCK(d);
|
||||
reset_d(d);
|
||||
BPFD_UNLOCK(d);
|
||||
if (opromisc) {
|
||||
|
Loading…
Reference in New Issue
Block a user