Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Shannon Nelson <shannon.nelson@amd.com>
Cc: kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org,
	drivers@pensando.io
Subject: Re: [PATCH v2 net] ionic: catch failure from devlink_alloc
Date: Tue, 2 May 2023 22:00:34 +0200	[thread overview]
Message-ID: <ZFFr4pBcOxbQTVPK@corigine.com> (raw)
In-Reply-To: <20230502183536.22256-1-shannon.nelson@amd.com>

On Tue, May 02, 2023 at 11:35:36AM -0700, Shannon Nelson wrote:
> Add a check for NULL on the alloc return.  If devlink_alloc() fails and
> we try to use devlink_priv() on the NULL return, the kernel gets very
> unhappy and panics. With this fix, the driver load will still fail,
> but at least it won't panic the kernel.
> 
> Fixes: df69ba43217d ("ionic: Add basic framework for IONIC Network device driver")
> Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
> ---
> v2 - fixed up the Fixes tag - thanks, Simon
> 	https://lore.kernel.org/netdev/Y%2F8tj+bqGG1g5InQ@vergenet.net/

Likewise, thanks.

Reviewed-by: Simon Horman <simon.horman@corigine.com>


  reply	other threads:[~2023-05-02 20:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02 18:35 [PATCH v2 net] ionic: catch failure from devlink_alloc Shannon Nelson
2023-05-02 20:00 ` Simon Horman [this message]
2023-05-03  7:33 ` Jiri Pirko
2023-05-03  8:20 ` patchwork-bot+netdevbpf

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=ZFFr4pBcOxbQTVPK@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=davem@davemloft.net \
    --cc=drivers@pensando.io \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shannon.nelson@amd.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