compat: fix a crash in the netlink backport
PATCH 1/1 compat: fix a crash in the netlink backport
Do not set the .doit wrapper if there is no .doit function.
Signed-off-by Felix Fietkau <[email protected]>
---
compat/compat-2.6.37.c +2 -1
@@ -130,7 +130,8 @@ int compat_genl_register_family_with_ops__copy (dumpit);__copy (done);#undef __copy - ops[i].ops.doit = nl_doit_wrapper; +if (ops[i].doit) + ops[i].ops.doit = nl_doit_wrapper; ret =genl_register_ops (&family->family, &ops[i].ops);if (ret <0 ) goto error_ops;
Luis R. Rodriguez
AppliedQuoted 3 lines · Felix Fietkau
Do not set the .doit wrapper if there is no .doit function.
Signed-off-by Felix Fietkau <[email protected]>
Thanks, applied.
Luis