Re: [PATCH for-next 3/3] IB/core, opa_vnic, hfi1, mlx5: Properly free rdma_netdev

Doug Ledford
2017-07-05T21:21:24Z

On Sun, 2017-07-02 at 16:23 +0300, Leon Romanovsky wrote:
> On Fri, Jun 30, 2017 at 01:14:46PM -0700, Dennis Dalessandro wrote:
> > From: Niranjana Vishwanathapura <niranjana.vishwanathapura-ral2JQCrhuE@public.gmane.org
> > m>
> >
> >
> > + netdev = mlx5_rdma_netdev_alloc(to_mdev(hca)->mdev, hca,
> > + name, setup);
>
> It can return NULL
>
> > + rn = netdev_priv(netdev);
> > + rn->free_rdma_netdev = mlx5_ib_free_rdma_netdev;
>
> This will crash in such case.

A fixed version of this patch is the last thing I'm waiting on before
sending my final -rc pull request to Linus. I would skip this, but
since the IPoIB fixes broke things, we need a proper version of this
patch to undo that breakage. I fixed it up as I saw fit and sent the
fixed version to the list on its own thread, please double check it
before I send it to Linus.

--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD