* [Intel-wired-lan] [PATCH net v1] ice: Fix VSI rebuild WARN_ON check for VF
@ 2022-07-15 22:27 Benjamin Mikailenko
2022-08-02 9:20 ` Szlosek, Marek
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Mikailenko @ 2022-07-15 22:27 UTC (permalink / raw)
To: intel-wired-lan; +Cc: Benjamin Mikailenko
In commit b03d519d3460 ("ice: store VF pointer instead of VF ID")
WARN_ON checks were added to validate the vsi->vf pointer and
catch programming errors. However, one check to vsi->vf was missed.
This caused a call trace when resetting VFs.
Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check.
Fixes: b03d519d3460 ("ice: store VF pointer instead of VF ID")
Signed-off-by: Benjamin Mikailenko <benjamin.mikailenko@intel.com>
---
drivers/net/ethernet/intel/ice/ice_lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index a6c4be5e5566..c67144952f94 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -3181,7 +3181,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi)
pf = vsi->back;
vtype = vsi->type;
- if (WARN_ON(vtype == ICE_VSI_VF) && !vsi->vf)
+ if (WARN_ON(vtype == ICE_VSI_VF && !vsi->vf))
return -EINVAL;
ice_vsi_init_vlan_ops(vsi);
--
2.34.3
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Intel-wired-lan] [PATCH net v1] ice: Fix VSI rebuild WARN_ON check for VF
2022-07-15 22:27 [Intel-wired-lan] [PATCH net v1] ice: Fix VSI rebuild WARN_ON check for VF Benjamin Mikailenko
@ 2022-08-02 9:20 ` Szlosek, Marek
0 siblings, 0 replies; 2+ messages in thread
From: Szlosek, Marek @ 2022-08-02 9:20 UTC (permalink / raw)
To: Mikailenko, Benjamin, intel-wired-lan@lists.osuosl.org
Cc: Mikailenko, Benjamin
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Benjamin Mikailenko
> Sent: sobota, 16 lipca 2022 00:27
> To: intel-wired-lan@lists.osuosl.org
> Cc: Mikailenko, Benjamin <benjamin.mikailenko@intel.com>
> Subject: [Intel-wired-lan] [PATCH net v1] ice: Fix VSI rebuild WARN_ON check
> for VF
>
> In commit b03d519d3460 ("ice: store VF pointer instead of VF ID") WARN_ON
> checks were added to validate the vsi->vf pointer and catch programming
> errors. However, one check to vsi->vf was missed.
> This caused a call trace when resetting VFs.
>
> Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check.
>
> Fixes: b03d519d3460 ("ice: store VF pointer instead of VF ID")
> Signed-off-by: Benjamin Mikailenko <benjamin.mikailenko@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_lib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c
> b/drivers/net/ethernet/intel/ice/ice_lib.c
> index a6c4be5e5566..c67144952f94 100644
> --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
Tested-by: Marek Szlosek <marek.szlosek@intel.com>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-02 9:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15 22:27 [Intel-wired-lan] [PATCH net v1] ice: Fix VSI rebuild WARN_ON check for VF Benjamin Mikailenko
2022-08-02 9:20 ` Szlosek, Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox