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)
Mar 1 2024, 9:25 PM
Unknown Object (File)
Dec 20 2023, 7:42 AM
Unknown Object (File)
Dec 11 2023, 2:22 AM
Unknown Object (File)
Oct 10 2023, 7:43 PM
Unknown Object (File)
Aug 15 2023, 8:37 AM
Unknown Object (File)
Jul 5 2023, 5:39 AM
Unknown Object (File)
May 12 2023, 1:44 PM
Unknown Object (File)
May 3 2023, 2:41 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.