# DF-3336 — netmap kqfilter is a stub: knotes never fire (functional hang), no detach bookkeeping

**Target:** `sys/net/netmap/netmap.c:1513-1546` (`netmap_kqfilter`,
`netmap_kqfilter_event`, `netmap_kqfilter_detach`), wired via
`netmap_cdevsw.d_kqfilter` (netmap_freebsd.c:402).

`netmap_kqfilter` accepts EVFILT_READ/EVFILT_WRITE and installs
`netmap_kqfilter_ops`, whose event routine **always returns 0**
(netmap.c:1513-1517) — "never ready".  Consequences for any process that
uses kevent/kqueue on a netmap fd (standard for event-driven netmap apps):

* `kevent()` with EV_ADD then wait sleeps forever — the netmap fd never
  reports readiness even with packets available (the wakeup side,
  `netmap_notify()` netmap.c:1815-1834, does KNOTE/wakeup on the selinfo
  lists, but the knote installed by netmap_kqfilter is never attached to
  any knlist and `f_event` returning 0 suppresses the event anyway);
* `netmap_kqfilter_detach` is a no-op and no knlist_init is performed
  (netmap.c:1519-1522, 1524-1526) — the knote lifetime is not tracked
  against the cdevpriv.

No memory-safety impact found (FILTEROP_ISFD + kernel-managed fd knotes;
the stub cannot corrupt the kqueue). The sleeping thread IS killable
(interruptible sleep), so this is a functional hang / API-completeness
defect, not a security DoS. Filed Info. On this tree the subsystem is
additionally dead code (does not compile — see DF-3332/env.txt).

Verification: skipped (Info). Fix = implement the real filterops
(attach knote to kring->si / na->tx_si/rx_si knlists, event returns
ring->avail > 0) or refuse kqfilter with EOPNOTNOTSUP... EOPNOTSUPP so
applications fail fast instead of hanging.
