Skip to contentSkip to conversation

ice: Do not get coalesce settings while in reset

PATCH Superseded Dawid Osuchowski 2 participants 2 messages Apr 23, 2024 – Apr 29, 2024

Subsystems (3)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ice: Do not get coalesce settings while in reset

From: Ngai-Mint Kwan <[email protected]>

Getting coalesce settings while reset is in progress can cause NULL pointer deference bug.
If under reset, abort get coalesce for ethtool.

Fixes 67fe64d78c43 ("ice: Implement getting and setting ethtool coalesce")

---
Changes since v1:
* Added "Fixes:" tag
Changes since v2:
* Rebased over current IWL net branch
* Confirmed that the issue previously reported for this patch [1] by Himasekhar Reddy Pucha was caused by other, internally tracked issue - reposting this as an ask for retest as well

[1] https://lore.kernel.org/netdev/BL0PR11MB3122D70ABDE6C2ACEE376073BD90A@BL0PR11MB3122.namprd11.prod.outlook.com/

---
 drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/ice/ice_ethtool.c +3 -0
index 78b833b3e1d7..efdfe46a91ee 100644
@@ -3825,6 +3825,9 @@ __ice_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *ec,
 	struct ice_netdev_priv *np = netdev_priv(netdev);
 	struct ice_vsi *vsi = np->vsi;
 
+	if (ice_is_reset_in_progress(vsi->back->state))
+		return -EBUSY;
+
 	if (q_num < 0)
 		q_num = 0;
 
Signature · 1 line
2.44.0
Tested-by on v3 1/1
#1 lore raw
Quoted 25 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Dawid Osuchowski
Sent: Tuesday, April 23, 2024 5:13 PM
To: [email protected]
Cc: Kwan, Ngai-mint <[email protected]>; [email protected]; Chmielewski, Pawel <[email protected]>; Simon Horman <[email protected]>; Polchlopek, Mateusz <[email protected]>; Dawid Osuchowski <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v3] ice: Do not get coalesce settings while in reset

From: Ngai-Mint Kwan <[email protected]>

Getting coalesce settings while reset is in progress can cause NULL pointer deference bug. If under reset, abort get coalesce for ethtool.

Fixes 67fe64d78c43 ("ice: Implement getting and setting ethtool coalesce")

---
Changes since v1:
* Added "Fixes:" tag
Changes since v2:
* Rebased over current IWL net branch
* Confirmed that the issue previously reported for this patch [1] by Himasekhar Reddy Pucha was caused by other, internally tracked issue - reposting this as an ask for retest as well

Quoted 5 lines

[1] https://lore.kernel.org/netdev/BL0PR11MB3122D70ABDE6C2ACEE376073BD90A@BL0PR11MB3122.namprd11.prod.outlook.com/

---
 drivers/net/ethernet/intel/ice/ice_ethtool.c | 3 +++
 1 file changed, 3 insertions(+)