Index: bpf.c =================================================================== RCS file: /cvs/src/sys/net/bpf.c,v retrieving revision 1.209 diff -u -p -r1.209 bpf.c --- bpf.c 13 Jan 2022 14:15:27 -0000 1.209 +++ bpf.c 13 Jan 2022 22:14:35 -0000 @@ -566,18 +566,23 @@ out: void bpf_wakeup(struct bpf_d *d) { + struct klist *klist; + MUTEX_ASSERT_LOCKED(&d->bd_mtx); if (d->bd_nreaders) wakeup(d); + klist = &d->bd_sel.si_note; + if (!klist_empty(klist)) + knote(klist, NOTE_SUBMIT); + /* * As long as pgsigio() and selwakeup() need to be protected * by the KERNEL_LOCK() we have to delay the wakeup to * another context to keep the hot path KERNEL_LOCK()-free. */ - if ((d->bd_async && d->bd_sig) || - (!klist_empty(&d->bd_sel.si_note) || d->bd_sel.si_seltid != 0)) { + if ((d->bd_async && d->bd_sig) || d->bd_sel.si_seltid != 0) { bpf_get(d); if (!task_add(systq, &d->bd_wake_task)) bpf_put(d);