Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu-stuck due to multiple registration of nf_hooks #498

Merged
merged 1 commit into from
May 23, 2023

Conversation

shenping-bd
Copy link
Collaborator

nf_register_hooks must be called only once upon nf_hook object, otherwise it would lead dead-loop and thus system hang.

We are using register_pernet_subsys as unified soltuion for all network namespaces, but nf_register_net_hooks is only available kernels >= 4.3.0. nf_register_net_hooks is called per-net, while nf_register_hook is NOT. So we need limit the calling of nf_register_hooks, and the same to it's pair: nf_unregister_hooks.

nf_register_hooks must be called only once upon nf_hook object, otherwise
it would lead dead-loop and thus system hang.

We are using register_pernet_subsys as unified soltuion for all network
namespaces, but nf_register_net_hooks is only available kernels >= 4.3.0.
nf_register_net_hooks is called per-net, while nf_register_hook is NOT.
So we need limit the calling of nf_register_hooks, and the same to it's
pair: nf_unregister_hooks.

Signed-off-by: shenping.matt <shenping.matt@bytedance.com>
@shenping-bd shenping-bd merged commit ac01805 into main May 23, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant