[PATCH 6.4 141/737] libbpf: only reset sec_def handler when necessary