I faced with two problems while use epoch(4) KPI with kernel modules:
- 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.
- 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().