Page MenuHomeFreeBSD

Add epoch_call_drain() function to wait until scheduled epoch_call() requests will be finished.
AbandonedPublic

Authored by ae on Apr 16 2019, 4:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 19 2026, 11:00 AM
Unknown Object (File)
Apr 19 2026, 8:23 AM
Unknown Object (File)
Apr 17 2026, 7:39 AM
Unknown Object (File)
Mar 30 2026, 6:18 AM
Unknown Object (File)
Mar 30 2026, 3:26 AM
Unknown Object (File)
Mar 24 2026, 4:18 AM
Unknown Object (File)
Mar 21 2026, 4:46 PM
Unknown Object (File)
Mar 21 2026, 2:53 AM
Subscribers

Details

Reviewers
mmacy
glebius
Summary

I faced with two problems while use epoch(4) KPI with kernel modules:

  1. The module creates new epoch with epoch_alloc(). It uses epoch_call() to make deferred free(). When module is unloaded, all scheduled free() do leak.
  2. The module uses existing epoch and uses epoch_call() to make deferred free(). When module is unloaded, there is highly likely chance to get memory leak and then page fault, when epoch_cb_task will call method that should make free().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 23696

Event Timeline

It seems this is not enough to prevent panics. Simple kernel module to reproduce the panic.