File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -578,8 +578,12 @@ nft_match_select_ops(const struct nft_ctx *ctx,
578578 struct xt_match * match = nft_match -> ops .data ;
579579
580580 if (strcmp (match -> name , mt_name ) == 0 &&
581- match -> revision == rev && match -> family == family )
581+ match -> revision == rev && match -> family == family ) {
582+ if (!try_module_get (match -> me ))
583+ return ERR_PTR (- ENOENT );
584+
582585 return & nft_match -> ops ;
586+ }
583587 }
584588
585589 match = xt_request_find_match (family , mt_name , rev );
@@ -648,8 +652,12 @@ nft_target_select_ops(const struct nft_ctx *ctx,
648652 struct xt_target * target = nft_target -> ops .data ;
649653
650654 if (strcmp (target -> name , tg_name ) == 0 &&
651- target -> revision == rev && target -> family == family )
655+ target -> revision == rev && target -> family == family ) {
656+ if (!try_module_get (target -> me ))
657+ return ERR_PTR (- ENOENT );
658+
652659 return & nft_target -> ops ;
660+ }
653661 }
654662
655663 target = xt_request_find_target (family , tg_name , rev );
You can’t perform that action at this time.
0 commit comments