#define net_drop_ns NULL
 #endif
 
+/* Returns true if the netns initialization is completed successfully */
+static inline bool net_initialized(const struct net *net)
+{
+       return READ_ONCE(net->list.next);
+}
 
 static inline void __netns_tracker_alloc(struct net *net,
                                         netns_tracker *tracker,
 
 
 static bool ipmr_can_free_table(struct net *net)
 {
-       return !check_net(net) || !net->ipv4.mr_rules_ops;
+       return !check_net(net) || !net_initialized(net);
 }
 
 static struct mr_table *ipmr_mr_table_iter(struct net *net,
 
 
 static bool ip6mr_can_free_table(struct net *net)
 {
-       return !check_net(net) || !net->ipv6.mr6_rules_ops;
+       return !check_net(net) || !net_initialized(net);
 }
 
 static struct mr_table *ip6mr_mr_table_iter(struct net *net,