diff --git a/include/net/netns/generic.h b/include/net/netns/generic.h index 0931618c0f7ff6d41f72db1103b2aa0dc474e21f..70e158551704767da8653bc4149698e34105a072 100644 --- a/include/net/netns/generic.h +++ b/include/net/netns/generic.h @@ -38,11 +38,9 @@ static inline void *net_generic(const struct net *net, int id) rcu_read_lock(); ng = rcu_dereference(net->gen); - BUG_ON(id == 0 || id > ng->len); ptr = ng->ptr[id - 1]; rcu_read_unlock(); - BUG_ON(!ptr); return ptr; } #endif