> -----Original Message----- > From: Jason Gunthorpe <jgg@xxxxxxxx> > Sent: Tuesday, July 9, 2019 1:50 AM > To: Leon Romanovsky <leon@xxxxxxxxxx> > Cc: Doug Ledford <dledford@xxxxxxxxxx>; Leon Romanovsky > <leonro@xxxxxxxxxxxx>; RDMA mailing list <linux-rdma@xxxxxxxxxxxxxxx>; > Parav Pandit <parav@xxxxxxxxxxxx>; Steve Wise > <swise@xxxxxxxxxxxxxxxxxxxxx> > Subject: Re: [PATCH rdma-next 2/2] IB: Support netlink commands in non > init_net net namespaces > > 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 > Adding it. > > -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 > Adding it. > Thanks, > Jason