mirror_ubuntu-kernels/drivers/net/ethernet/intel/iavf
Piotr Gardocki 0fb1d8eb23 iavf: fix potential races for FDIR filters
Add fdir_fltr_lock locking in unprotected places.

The change in iavf_fdir_is_dup_fltr adds a spinlock around a loop which
iterates over all filters and looks for a duplicate. The filter can be
removed from list and freed from memory at the same time it's being
compared. All other places where filters are deleted are already
protected with spinlock.

The remaining changes protect adapter->fdir_active_fltr variable so now
all its uses are under a spinlock.

Fixes: 527691bf06 ("iavf: Support IPv4 Flow Director filters")
Signed-off-by: Piotr Gardocki <piotrx.gardocki@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20230807205011.3129224-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-08 16:38:28 -07:00
..
iavf_adminq_cmd.h
iavf_adminq.c iavf: Fix adminq error handling 2022-08-12 08:22:55 -07:00
iavf_adminq.h intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
iavf_adv_rss.c iavf: Support for modifying SCTP RSS flow hashing 2021-04-22 09:26:23 -07:00
iavf_adv_rss.h iavf: Support for modifying SCTP RSS flow hashing 2021-04-22 09:26:23 -07:00
iavf_alloc.h iavf: remove some unused functions and pointless wrappers 2023-06-22 09:26:55 -07:00
iavf_client.c virtchnl: i40e/iavf: rename iwarp to rdma 2023-01-25 08:55:19 -08:00
iavf_client.h virtchnl: i40e/iavf: rename iwarp to rdma 2023-01-25 08:55:19 -08:00
iavf_common.c iavf: remove some unused functions and pointless wrappers 2023-06-22 09:26:55 -07:00
iavf_devids.h
iavf_ethtool.c iavf: fix potential races for FDIR filters 2023-08-08 16:38:28 -07:00
iavf_fdir.c iavf: fix potential races for FDIR filters 2023-08-08 16:38:28 -07:00
iavf_fdir.h iavf: change the flex-byte support number to macro definition 2021-04-23 09:03:56 -07:00
iavf_main.c iavf: check for removal state before IAVF_FLAG_PF_COMMS_FAILED 2023-07-21 08:49:37 -07:00
iavf_osdep.h iavf: remove some unused functions and pointless wrappers 2023-06-22 09:26:55 -07:00
iavf_prototype.h iavf: remove some unused functions and pointless wrappers 2023-06-22 09:26:55 -07:00
iavf_register.h iavf: remove mask from iavf_irq_enable_queues() 2023-06-10 00:09:54 -07:00
iavf_status.h virtchnl: i40e/iavf: rename iwarp to rdma 2023-01-25 08:55:19 -08:00
iavf_trace.h intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
iavf_txrx.c iavf: make functions static where possible 2023-06-22 09:27:08 -07:00
iavf_txrx.h iavf: make functions static where possible 2023-06-22 09:27:08 -07:00
iavf_type.h iavf: clean up packet type lookup table 2021-06-18 09:04:44 -07:00
iavf_virtchnl.c iavf: fix reset task race with iavf_remove() 2023-07-17 10:20:28 -07:00
iavf.h iavf: fix reset task race with iavf_remove() 2023-07-17 10:20:28 -07:00
Makefile iavf: Support for modifying TCP RSS flow hashing 2021-04-22 09:26:23 -07:00