intel-wired-lan.lists.osuosl.org archive mirror
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>,
	netdev@vger.kernel.org,
	Pawel Chmielewski <pawel.chmielewski@intel.com>,
	Simon Horman <horms@kernel.org>,
	Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v4] ice: Do not get coalesce settings while in reset
Date: Thu, 9 May 2024 09:11:13 -0700	[thread overview]
Message-ID: <0257b1fb-3e0a-d5d2-4e2c-eedc12e7dcd6@intel.com> (raw)
In-Reply-To: <20240506153307.114104-1-dawid.osuchowski@linux.intel.com>



On 5/6/2024 8:33 AM, Dawid Osuchowski wrote:
> 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>
> Co-developed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
> 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
> Changes since v3:
> * Using ice_wait_for_reset() instead of returning -EBUSY

Seems like commit message, and probably title, need to get updated for 
this change?

> [1] https://lore.kernel.org/netdev/BL0PR11MB3122D70ABDE6C2ACEE376073BD90A@BL0PR11MB3122.namprd11.prod.outlook.com/
> ---
>   drivers/net/ethernet/intel/ice/ice_ethtool.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index d91f41f61bce..4ff16fd2eb94 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3815,6 +3815,13 @@ __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)) {
> +		int err = ice_wait_for_reset(vsi->back, 10 * HZ);
> +
> +		if (err)
> +			return err;
> +	}
> +
>   	if (q_num < 0)
>   		q_num = 0;
>   

      reply	other threads:[~2024-05-09 16:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 15:33 [Intel-wired-lan] [PATCH iwl-net v4] ice: Do not get coalesce settings while in reset Dawid Osuchowski
2024-05-09 16:11 ` Tony Nguyen [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=0257b1fb-3e0a-d5d2-4e2c-eedc12e7dcd6@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=dawid.osuchowski@linux.intel.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=mateusz.polchlopek@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=ngai-mint.kwan@intel.com \
    --cc=pawel.chmielewski@intel.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 read-only IMAP folder(s) and NNTP newsgroup(s).