Avoid infinite loops in BPF.Table destructor
In the case that python process tries to clear() a table object while
the bpf program is still running and doing lookup_or_init, the python
clean() routine will race with the bpf program (and bpf will win in the
case of frequent kprobe hits) causing a hang. Instead, first get the
full list of keys and then delete them rather than rely on the default
popitem implementation.
Fixes: #233
Signed-off-by: Brenden Blanco <bblanco@plumgrid.com>
Showing
Please register or sign in to comment