[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MW4PR11MB5911CC01EAA08BFD0E38F4A1BA562@MW4PR11MB5911.namprd11.prod.outlook.com>
Date: Fri, 1 Nov 2024 23:01:39 +0000
From: "Singh, Krishneil K" <krishneil.k.singh@...el.com>
To: "Linga, Pavan Kumar" <pavan.kumar.linga@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "horms@...nel.org"
<horms@...nel.org>, "Linga, Pavan Kumar" <pavan.kumar.linga@...el.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>, "Singh, Tarun K"
<tarun.k.singh@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net v2 1/2] idpf: avoid vport access
in idpf_get_link_ksettings
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Pavan Kumar Linga
> Sent: Friday, October 25, 2024 11:39 AM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org; horms@...nel.org; Linga, Pavan Kumar
> <pavan.kumar.linga@...el.com>; stable@...r.kernel.org; Singh, Tarun K
> <tarun.k.singh@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2 1/2] idpf: avoid vport access in
> idpf_get_link_ksettings
>
> When the device control plane is removed or the platform
> running device control plane is rebooted, a reset is detected
> on the driver. On driver reset, it releases the resources and
> waits for the reset to complete. If the reset fails, it takes
> the error path and releases the vport lock. At this time if the
> monitoring tools tries to access link settings, it call traces
> for accessing released vport pointer.
>
> To avoid it, move link_speed_mbps to netdev_priv structure
> which removes the dependency on vport pointer and the vport lock
> in idpf_get_link_ksettings. Also use netif_carrier_ok()
> to check the link status and adjust the offsetof to use link_up
> instead of link_speed_mbps.
>
> Fixes: 02cbfba1add5 ("idpf: add ethtool callbacks")
> Cc: stable@...r.kernel.org # 6.7+
> Reviewed-by: Tarun K Singh <tarun.k.singh@...el.com>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@...el.com>
> ---
> drivers/net/ethernet/intel/idpf/idpf.h | 4 ++--
> drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 11 +++--------
> drivers/net/ethernet/intel/idpf/idpf_lib.c | 4 ++--
> drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 2 +-
> 4 files changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf.h
> b/drivers/net/ethernet/intel/idpf/idpf.h
> index 2c31ad87587a..66544faab710 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf.h
> +++ b/drivers/net/ethernet/intel/idpf/idpf.h
Tested-by: Krishneil Singh <krishneil.k.singh@...el.com>
Powered by blists - more mailing lists