On Thu, Jul 04, 2019 at 04:04:02PM +0300, Leon Romanovsky wrote: > -int rdma_nl_unicast(struct sk_buff *skb, u32 pid) > +int rdma_nl_unicast(struct net *net, struct sk_buff *skb, u32 pid) > { > + struct rdma_dev_net *rnet = net_generic(net, rdma_dev_net_id); This should be a proper type safe accessor in all places > -void rdma_nl_exit(void) > +void rdma_nl_net_exit(struct rdma_dev_net *rnet) > { > - int idx; > - > - for (idx = 0; idx < RDMA_NL_NUM_CLIENTS; idx++) > - rdma_nl_unregister(idx); There should be a WARN_ON during the module unload that no NL clients are still registered Thanks, Jason