[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id:
<168776822102.25852.12583740452998430617.git-patchwork-notify@kernel.org>
Date: Mon, 26 Jun 2023 08:30:21 +0000
From: patchwork-bot+netdevbpf@...nel.org
To: <edward.cree@....com>
Cc: linux-net-drivers@....com, davem@...emloft.net, kuba@...nel.org,
edumazet@...gle.com, pabeni@...hat.com, ecree.xilinx@...il.com,
netdev@...r.kernel.org, habetsm.xilinx@...il.com,
pieter.jansen-van-vuuren@....com
Subject: Re: [PATCH net] sfc: fix crash when reading stats while NIC is resetting
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@...emloft.net>:
On Fri, 23 Jun 2023 15:34:48 +0100 you wrote:
> From: Edward Cree <ecree.xilinx@...il.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
Powered by blists - more mailing lists