mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Cree <ecree.xilinx@gmail.com>
To: Kyungwook Boo <bookyungwook@gmail.com>,
	Martin Habets <habetsm.xilinx@gmail.com>
Cc: netdev@vger.kernel.org, linux-net-drivers@amd.com,
	linux-kernel@vger.kernel.org
Subject: Re: Null-pointer-dereference in ef100_process_design_param()
Date: Thu, 20 Feb 2025 15:35:50 +0000	[thread overview]
Message-ID: <92115b07-a0ba-1881-cbca-3798510c3f16@gmail.com> (raw)
In-Reply-To: <CAHiwTZ=O=sHBD1RCZgAWRRo3Kb-DQvWdu_7FSws=Zxg+TM4Dyw@mail.gmail.com>

On 19/02/2025 10:04, Kyungwook Boo wrote:
> It seems that a null pointer dereference issue in ef100_process_design_param()
> can occur due to an uninitialized pointer efx->net_dev.

Yes, your diagnosis looks correct to me.
Moreover, besides the calls you identify, the function also has calls to
 netif_err() using the same efx->net_dev pointer.

My preferred solution is to keep ef100_check_design_params() where it is,
 but move the netif_set_tso_max_{size,segs}() calls into
 ef100_probe_netdev(), after the netdevice is allocated, and using the
 values stashed in nic_data; also to replace the netif_err() calls with
 pci_err().  I will develop a patch accordingly.

       reply	other threads:[~2025-02-20 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHiwTZ=O=sHBD1RCZgAWRRo3Kb-DQvWdu_7FSws=Zxg+TM4Dyw@mail.gmail.com>
2025-02-20 15:35 ` Edward Cree [this message]
2025-02-21 11:45   ` Kyungwook Boo

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=92115b07-a0ba-1881-cbca-3798510c3f16@gmail.com \
    --to=ecree.xilinx@gmail.com \
    --cc=bookyungwook@gmail.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®