* [PATCH iwl-net v3] ice: Do not get coalesce settings while in reset
@ 2024-04-23 11:43 Dawid Osuchowski
2024-04-29 3:51 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
0 siblings, 1 reply; 2+ messages in thread
From: Dawid Osuchowski @ 2024-04-23 11:43 UTC (permalink / raw)
To: intel-wired-lan
Cc: netdev, Ngai-Mint Kwan, Mateusz Polchlopek, Pawel Chmielewski,
Simon Horman, Dawid Osuchowski
From: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
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")
Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
---
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(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index 78b833b3e1d7..efdfe46a91ee 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -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;
--
2.44.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [Intel-wired-lan] [PATCH iwl-net v3] ice: Do not get coalesce settings while in reset
2024-04-23 11:43 [PATCH iwl-net v3] ice: Do not get coalesce settings while in reset Dawid Osuchowski
@ 2024-04-29 3:51 ` Pucha, HimasekharX Reddy
0 siblings, 0 replies; 2+ messages in thread
From: Pucha, HimasekharX Reddy @ 2024-04-29 3:51 UTC (permalink / raw)
To: Dawid Osuchowski, intel-wired-lan@lists.osuosl.org
Cc: Kwan, Ngai-mint, netdev@vger.kernel.org, Chmielewski, Pawel,
Simon Horman, Polchlopek, Mateusz
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Dawid Osuchowski
> Sent: Tuesday, April 23, 2024 5:13 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: Kwan, Ngai-mint <ngai-mint.kwan@intel.com>; netdev@vger.kernel.org; Chmielewski, Pawel <pawel.chmielewski@intel.com>; Simon Horman <horms@kernel.org>; Polchlopek, Mateusz <mateusz.polchlopek@intel.com>; Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v3] ice: Do not get coalesce settings while in reset
>
> From: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
>
> 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")
> Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
> Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
> Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> Signed-off-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
> ---
> 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(+)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-29 3:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23 11:43 [PATCH iwl-net v3] ice: Do not get coalesce settings while in reset Dawid Osuchowski
2024-04-29 3:51 ` [Intel-wired-lan] " Pucha, HimasekharX Reddy
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).