HomeFreeBSD

MFC r286260:

Description

MFC r286260:

Remove the mtx_sleep() from the kqueue f_event filter.

The filter is called from the network hot path and must not sleep.

The filter runs with the descriptor lock held and does not manipulate the
buffers, so it is not necessary sleep when the hold buffer is in use.

Just ignore the hold buffer contents when it is being copied to user space
(when hold buffer in use is set).

This fix the "Sleeping thread owns a non-sleepable lock" panic when the
userland thread is too busy reading the packets from bpf(4).

PR:           [[ https://bugs.freebsd.org/200323 | 200323 ]]
Sponsored by: Rubicon Communications (Netgate)

Details

Provenance
loosAuthored on
Parents
rS286858: Merge ^/head r286697 through r286857.
Branches
Unknown
Tags
Unknown