[Intel-wired-lan] [PATCH net v2] i40e: Fix NULL ptr dereference on VSI filter sync

Nguyen, Anthony L anthony.l.nguyen at intel.com
Wed Feb 17 22:26:06 UTC 2021


On Wed, 2021-02-17 at 11:25 +0000, Michał Małoszewski wrote:
> Remove the reason of null pointer dereference in sync vsi filters.
> Added new I40E_VSI_RELEASING flag to signalize deleting and releasing
> of VSI resources to sync this thread with sync filters subtask.
> Without this patch it is possible to start update the vsi filter list
> after vsi is removed, that's causing a kernel oops.
> 
> Fixes: 17652c6336fd("i40e: remove unused argument")
> Reviewed-by: Przemyslaw Patynowski <przemyslawx.patynowski at intel.com>
> Reviewed-by: Fijalkowski, WitoldX <witoldx.fijalkowski at intel.com>
> Reviewed-by: Jaroslaw Gawin <jaroslawx.gawin at intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek at intel.com>
> Signed-off-by: Michal Maloszewski <michal.maloszewski at intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h      | 79
> +++++++++++++++++++++++++++++
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 60 ++++++++++++++++---
> ---
>  2 files changed, 124 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h
> b/drivers/net/ethernet/intel/i40e/i40e.h
> index 425d620..558b0ae 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e.h
> @@ -158,6 +158,7 @@ enum i40e_vsi_state_t {
>  	__I40E_VSI_OVERFLOW_PROMISC,
>  	__I40E_VSI_REINIT_REQUESTED,
>  	__I40E_VSI_DOWN_REQUESTED,
> +	__I40E_VSI_RELEASING,
>  	/* This must be last as it determines the size of the BITMAP */
>  	__I40E_VSI_STATE_SIZE__,
>  };
> @@ -425,6 +426,8 @@ struct i40e_channel {
>  	struct i40e_vsi *parent_vsi;
>  };
>  
> +struct i40e_ptp_pins_settings;
> +
>  static inline bool i40e_is_channel_macvlan(struct i40e_channel *ch)
>  {
>  	return !!ch->fwd;
> @@ -641,12 +644,83 @@ struct i40e_pf {
>  	struct i40e_rx_pb_config pb_cfg; /* Current Rx packet buffer
> config */
>  	struct i40e_dcbx_config tmp_cfg;
>  
> +/* GPIO defines used by PTP */
> +#define I40E_SDP3_2			18
> +#define I40E_SDP3_3			19

...

There's a lot of code here that isn't related to the patch and not
mentioned in the commit message. It also wasn't in your v1. It looks
like pieces of other patches. Please review your patch before sending
it.

Thanks,
Tony


More information about the Intel-wired-lan mailing list