]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ice: set tx_tstamps when creating new Tx rings via ethtool
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 27 Jul 2022 23:15:57 +0000 (16:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:58:11 +0000 (09:58 +0200)
commit13180cb88a7be5ee389f65f6ab9f78e46f7722b2
tree2ba93cf79b3219f07a098cb9e77d3d4743e6ce95
parent8735e5c122b6176e3017c35a24a24fcc5284d160
ice: set tx_tstamps when creating new Tx rings via ethtool

[ Upstream commit b3b173745c8cab1e24d6821488b60abed3acb24d ]

When the user changes the number of queues via ethtool, the driver
allocates new rings. This allocation did not initialize tx_tstamps. This
results in the tx_tstamps field being zero (due to kcalloc allocation), and
would result in a NULL pointer dereference when attempting a transmit
timestamp on the new ring.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_ethtool.c