netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
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: Wed, 3 May 2023 09:33:14 +0200	[thread overview]
Message-ID: <ZFIOOp1j2O5g6V0+@nanopsycho> (raw)
In-Reply-To: <20230502183536.22256-1-shannon.nelson@amd.com>

Tue, May 02, 2023 at 08:35:36PM CEST, shannon.nelson@amd.com 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>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

  parent reply	other threads:[~2023-05-03  7:33 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
2023-05-03  7:33 ` Jiri Pirko [this message]
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=ZFIOOp1j2O5g6V0+@nanopsycho \
    --to=jiri@resnulli.us \
    --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;
as well as URLs for NNTP newsgroup(s).