All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Camelia Groza <camelia.groza@nxp.com>
Cc: f.fainelli@gmail.com, hkallweit1@gmail.com, davem@davemloft.net,
	oss@buserror.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: phy: guard against accessing a NULL features bitmap
Date: Fri, 11 Jan 2019 14:37:30 +0100	[thread overview]
Message-ID: <20190111133730.GA1895@lunn.ch> (raw)
In-Reply-To: <1547207806-30572-1-git-send-email-camelia.groza@nxp.com>

On Fri, Jan 11, 2019 at 01:56:46PM +0200, Camelia Groza wrote:
> Since phy driver features became a link_mode bitmap, phy drivers that
> don't have a list of features configured will cause the kernel to crash
> when probed.

Hi Camelia

A NULL features is a driver bug. So i would prefer to solve this
differently.

Please make phy_driver_register() do a WARN_ON(!new_driver->features)
and return -EINVAL.

Do you know of a specific driver which as a NULL value? We should fix
that as well.

Thank
	Andrew

  reply	other threads:[~2019-01-11 13:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 11:56 [PATCH net] net: phy: guard against accessing a NULL features bitmap Camelia Groza
2019-01-11 13:37 ` Andrew Lunn [this message]
2019-01-11 14:09   ` Camelia Alexandra Groza
2019-01-11 14:19     ` Andrew Lunn

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=20190111133730.GA1895@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=camelia.groza@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss@buserror.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.