public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Daniel Danzberger <dd@embedd.com>
Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
	netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH] net: dsa: microchip: fix NULL pointer dereference on platform init
Date: Tue, 5 Dec 2023 14:04:21 +0200	[thread overview]
Message-ID: <20231205120421.yfs52kp2ttlqkwlb@skbuf> (raw)
In-Reply-To: <db36974a7383bd30037ffda796338c7f4cdfffd7.camel@embedd.com>

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@embedd.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.

  reply	other threads:[~2023-12-05 12:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 15:43 [PATCH] net: dsa: microchip: fix NULL pointer dereference on platform init Daniel Danzberger
2023-12-04 17:43 ` Vladimir Oltean
2023-12-05  8:00   ` Daniel Danzberger
2023-12-05  8:36     ` Vladimir Oltean
2023-12-05  9:08       ` Daniel Danzberger
2023-12-05  9:39         ` Vladimir Oltean
2023-12-05 16:55     ` Vladimir Oltean
2023-12-05 17:33       ` Daniel Danzberger
2023-12-05 18:17         ` Vladimir Oltean
2023-12-05 22:15           ` Daniel Danzberger
2023-12-06  0:37             ` Vladimir Oltean
2023-12-06 15:26               ` Andrew Lunn
2023-12-06 21:49                 ` Vladimir Oltean
2023-12-05 10:12 ` Vladimir Oltean
2023-12-05 11:44   ` Daniel Danzberger
2023-12-05 12:04     ` Vladimir Oltean [this message]
2023-12-05 12:42       ` Vladimir Oltean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231205120421.yfs52kp2ttlqkwlb@skbuf \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=dd@embedd.com \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox