Split kfence.c into kfence_core.c (pool allocator, error reporting,
debugfs) and kfence_steal.c (heartbeat timer and freelist stealing
mechanism).
This will ease trying other sampling approaches, e.g. the naive
counter-based one. Those implementations will need to implement their own
kfence_init() and use the API declared in kfence_core.h.
The change also helped discover an incorrect lock having been used in
obj_show().
Split kfence.c into kfence_core.c (pool allocator, error reporting, debugfs) and kfence_steal.c (heartbeat timer and freelist stealing mechanism). This will ease trying other sampling approaches, e.g. the naive counter-based one. Those implementations will need to implement their own kfence_init() and use the API declared in kfence_core.h.
The change also helped discover an incorrect lock having been used in obj_show().
Signed-off-by: Alexander Potapenko glider@google.com