From: Kyungwook Boo <bookyungwook@gmail.com>
To: Edward Cree <ecree.xilinx@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: Fri, 21 Feb 2025 20:45:51 +0900 [thread overview]
Message-ID: <2f44710b-5f4d-4edb-8b1e-ced6636e2957@gmail.com> (raw)
In-Reply-To: <92115b07-a0ba-1881-cbca-3798510c3f16@gmail.com>
Hello, Edward,
Thank you for your reply.
On 25. 2. 21. 00:35, Edward Cree wrote:
> 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.
I agree with your finding--I missed that one.
> 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.
I was wondering whether the calling condition will be properly maintained when
relocating netif_set_tso_max_{size,segs}().
I’m not entirely sure, but if maintaining this condition is unnecessary or has
already been considered, then your suggestion seems to be the better approach.
Best regards,
Kyungwook Boo
prev parent reply other threads:[~2025-02-21 11:45 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
2025-02-21 11:45 ` Kyungwook Boo [this message]
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=2f44710b-5f4d-4edb-8b1e-ced6636e2957@gmail.com \
--to=bookyungwook@gmail.com \
--cc=ecree.xilinx@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®