netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: <edward.cree@amd.com>
Cc: linux-net-drivers@amd.com, davem@davemloft.net, kuba@kernel.org,
	edumazet@google.com, pabeni@redhat.com, ecree.xilinx@gmail.com,
	netdev@vger.kernel.org, habetsm.xilinx@gmail.com,
	pieter.jansen-van-vuuren@amd.com
Subject: Re: [PATCH net] sfc: fix crash when reading stats while NIC is resetting
Date: Mon, 26 Jun 2023 08:30:21 +0000	[thread overview]
Message-ID: <168776822102.25852.12583740452998430617.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20230623143448.47159-1-edward.cree@amd.com>

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 23 Jun 2023 15:34:48 +0100 you wrote:
> From: Edward Cree <ecree.xilinx@gmail.com>
> 
> efx_net_stats() (.ndo_get_stats64) can be called during an ethtool
>  selftest, during which time nic_data->mc_stats is NULL as the NIC has
>  been fini'd.  In this case do not attempt to fetch the latest stats
>  from the hardware, else we will crash on a NULL dereference:
>     BUG: kernel NULL pointer dereference, address: 0000000000000038
>     RIP efx_nic_update_stats
>     abridged calltrace:
>     efx_ef10_update_stats_pf
>     efx_net_stats
>     dev_get_stats
>     dev_seq_printf_stats
> Skipping the read is safe, we will simply give out stale stats.
> To ensure that the free in efx_ef10_fini_nic() does not race against
>  efx_ef10_update_stats_pf(), which could cause a TOCTTOU bug, take the
>  efx->stats_lock in fini_nic (it is already held across update_stats).
> 
> [...]

Here is the summary with links:
  - [net] sfc: fix crash when reading stats while NIC is resetting
    https://git.kernel.org/netdev/net/c/d1b355438b83

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      reply	other threads:[~2023-06-26  8:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 14:34 [PATCH net] sfc: fix crash when reading stats while NIC is resetting edward.cree
2023-06-26  8:30 ` patchwork-bot+netdevbpf [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=168776822102.25852.12583740452998430617.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=edward.cree@amd.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pieter.jansen-van-vuuren@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).