Re: [EXT] Re: [net PATCH 5/9] octeontx2-pf: mcs: Fix NULL pointer dereferences

From: Leon Romanovsky
Date: Wed Apr 26 2023 - 02:17:05 EST


On Tue, Apr 25, 2023 at 08:51:40AM -0700, Jakub Kicinski wrote:
> On Mon, 24 Apr 2023 10:29:02 +0000 Subbaraya Sundeep Bhatta wrote:
> > >How did you get call to .mdo_del_secy if you didn't add any secy?
> > >
> > >Thanks
> > >
> > It is because of the order of teardown in otx2_remove:
> > cn10k_mcs_free(pf);
> > unregister_netdev(netdev);
> >
> > cn10k_mcs_free free the resources and makes cfg as NULL.
> > Later unregister_netdev calls mdo_del_secy and finds cfg as NULL.
> > Thanks for the review I will change the order and submit next version.
>
> Leon, ack? Looks like the patches got "changes requested" but I see
> no other complaint.

Honestly, I was confused and didn't know what to answer, so decided to
see next version.

>From one side Subbaraya said that it is possible (which was not
convincing to me, but ok, most time I'm wrong :)), from another
he said that he will submit next version.

Thanks