xtables: Do not register matches/targets with incompatible revision
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Phil Sutter
reviewerHi Serhey,
Quoted 2 lines · Serhey Popovych
If kernel tells revision isn't found/supported at the moment we should keep entity in pending list, not register or bail to do so later.
This causes a problem in particular with conntrack match (but others may be affected as well): If the kernel doesn't support an older revision of the match, it stays in pending list and is retried for each new rule using the match.
Quoted 2 lines
Kernel might still load module for entity we asking it for and this could be slow on some embedded devices.
Is this a speculative problem or did you see it in reality? I'm wondering because kernel uses try_then_request_module() to load the missing extension which calls __request_module() with 'wait' parameter set to true. So unless the called usermode helper is behaving unexpected (e.g. fork and load in background), the call to compatible_match_revision() should block until the module has been loaded, no?
Quoted 2 lines
Catch double registration attempts by checking
me->nextbeing non-NULL inxtables_register_match()andxtables_register_target().
Is this a side-effect of the above or an independent fix?
Cheers, Phil