Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Pawel Chmielewski <pawel.chmielewski@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>,
	netdev@vger.kernel.org,
	Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next] ice: Do not get coalesce settings while in reset
Date: Tue, 5 Dec 2023 17:09:48 +0100	[thread overview]
Message-ID: <8eca364e-8796-d01f-ead3-2a419a9f7658@intel.com> (raw)
In-Reply-To: <20231205152620.568183-1-pawel.chmielewski@intel.com>

On 12/5/23 16:26, Pawel Chmielewski 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.
> 
> 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>
> ---
>   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 bde9bc74f928..2d565cc484a0 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3747,6 +3747,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;
>   

Sorry for a late review,
This asks for a Fixes: tag, and targeting at iwl-net instead :)
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  reply	other threads:[~2023-12-05 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 15:26 [Intel-wired-lan] [PATCH iwl-next] ice: Do not get coalesce settings while in reset Pawel Chmielewski
2023-12-05 16:09 ` Przemek Kitszel [this message]
2023-12-06 17:37   ` Pawel Chmielewski
2023-12-18  5:25 ` Pucha, HimasekharX Reddy

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=8eca364e-8796-d01f-ead3-2a419a9f7658@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --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