[Bug 200323] BPF userland misuse can crash the system

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Aug 3 22:15:17 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200323

--- Comment #22 from commit-hook at freebsd.org ---
A commit references this bug:

Author: loos
Date: Mon Aug  3 22:14:46 UTC 2015
New revision: 286260
URL: https://svnweb.freebsd.org/changeset/base/286260

Log:
  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 manipulates 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:        200323
  MFC after:    2 weeks
  Sponsored by:    Rubicon Communications (Netgate)

Changes:
  head/sys/net/bpf.c

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-net mailing list