[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231205120421.yfs52kp2ttlqkwlb@skbuf>
Date: Tue, 5 Dec 2023 14:04:21 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Daniel Danzberger <dd@...edd.com>
Cc: woojung.huh@...rochip.com, UNGLinuxDriver@...rochip.com,
netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH] net: dsa: microchip: fix NULL pointer dereference on
platform init
On Tue, Dec 05, 2023 at 12:44:41PM +0100, Daniel Danzberger wrote:
> On Tue, 2023-12-05 at 12:12 +0200, Vladimir Oltean wrote:
> > On Mon, Dec 04, 2023 at 04:43:15PM +0100, Daniel Danzberger wrote:
> > > Fixes a NULL pointer access when registering a switch device that has
> > > not been defined via DTS.
> > >
> > > This might happen when the switch is used on a platform like x86 that
> > > doesn't use DTS and instantiates devices in platform specific init code.
> > >
> > > Signed-off-by: Daniel Danzberger <dd@...edd.com>
> > > ---
> >
> > I'm sorry, I just don't like the state in which your patch leaves the
> > driver. Would you mind testing this attached patch instead?
> Works fine. I could however only test the platform_data path, not the DTS path.
>
> I would also move the 'enum ksz_chip_id' to the platform include, so instantiating code can use the
> enums to set ksz_platform_data.chip_id. (See attached patch)
Ok, looks alright. Code movement will have to be a separate patch 1/2,
to not pollute the actual code changes from 2/2.
Also, please keep my authorship information and sign off. You can post
the 2 patches as a v2 of this series (separate thread). General info:
when submitting somebody else's patch you have to add your sign off at
the end of the commit, immediately after his, so that it is apparent in
the git log that he didn't submit it himself.
The change doesn't functionally affect the DT probing path (it just
renames variables), so it's reasonable to assume that it won't break
things.
Thanks.
Powered by blists - more mailing lists