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 @@ -629,8 +629,12 @@ nft_match_select_ops(const struct nft_ctx *ctx,
629629 struct xt_match * match = nft_match -> ops .data ;
630630
631631 if (strcmp (match -> name , mt_name ) == 0 &&
632- match -> revision == rev && match -> family == family )
632+ match -> revision == rev && match -> family == family ) {
633+ if (!try_module_get (match -> me ))
634+ return ERR_PTR (- ENOENT );
635+
633636 return & nft_match -> ops ;
637+ }
634638 }
635639
636640 match = xt_request_find_match (family , mt_name , rev );
@@ -700,8 +704,12 @@ nft_target_select_ops(const struct nft_ctx *ctx,
700704 struct xt_target * target = nft_target -> ops .data ;
701705
702706 if (strcmp (target -> name , tg_name ) == 0 &&
703- target -> revision == rev && target -> family == family )
707+ target -> revision == rev && target -> family == family ) {
708+ if (!try_module_get (target -> me ))
709+ return ERR_PTR (- ENOENT );
710+
704711 return & nft_target -> ops ;
712+ }
705713 }
706714
707715 target = xt_request_find_target (family , tg_name , rev );
You can’t perform that action at this time.
0 commit comments