File tree 1 file changed +10
-2
lines changed
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,
629
629
struct xt_match * match = nft_match -> ops .data ;
630
630
631
631
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
+
633
636
return & nft_match -> ops ;
637
+ }
634
638
}
635
639
636
640
match = xt_request_find_match (family , mt_name , rev );
@@ -700,8 +704,12 @@ nft_target_select_ops(const struct nft_ctx *ctx,
700
704
struct xt_target * target = nft_target -> ops .data ;
701
705
702
706
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
+
704
711
return & nft_target -> ops ;
712
+ }
705
713
}
706
714
707
715
target = xt_request_find_target (family , tg_name , rev );
You can’t perform that action at this time.
0 commit comments