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 @@ -578,8 +578,12 @@ nft_match_select_ops(const struct nft_ctx *ctx,
578
578
struct xt_match * match = nft_match -> ops .data ;
579
579
580
580
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
+
582
585
return & nft_match -> ops ;
586
+ }
583
587
}
584
588
585
589
match = xt_request_find_match (family , mt_name , rev );
@@ -648,8 +652,12 @@ nft_target_select_ops(const struct nft_ctx *ctx,
648
652
struct xt_target * target = nft_target -> ops .data ;
649
653
650
654
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
+
652
659
return & nft_target -> ops ;
660
+ }
653
661
}
654
662
655
663
target = xt_request_find_target (family , tg_name , rev );
You can’t perform that action at this time.
0 commit comments