]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ice: fix wrong fallback logic for FDIR
authorSimei Su <simei.su@intel.com>
Wed, 22 Mar 2023 02:24:15 +0000 (10:24 +0800)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:56 +0000 (13:33 +0200)
commitf501cdc5a7fc21e31333969cbe4b26da4aeebfb6
treef0dcefa4cd2bacf3b7930664a017fa23756fbb47
parentce4fd92ec9284d91b586725b60dd703a0d658873
ice: fix wrong fallback logic for FDIR

BugLink: https://bugs.launchpad.net/bugs/2016879
[ Upstream commit b4a01ace20f5c93c724abffc0a83ec84f514b98d ]

When adding a FDIR filter, if ice_vc_fdir_set_irq_ctx returns failure,
the inserted fdir entry will not be removed and if ice_vc_fdir_write_fltr
returns failure, the fdir context info for irq handler will not be cleared
which may lead to inconsistent or memory leak issue. This patch refines
failure cases to resolve this issue.

Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF")
Signed-off-by: Simei Su <simei.su@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c