On Tue, Oct 27, 2026 at 10:51:36AM +0000, Anurag Mandal wrote:
> ice_fdir_setup() returns directly when the filter list or counter
> initialization fails, leaking the FDIR VSI, plus the filter hash table
> and map in the counter case. Its other error paths release the queues
> and the VSI, but not the hash table, hash map or counter pools.
>
> As fdir_vsi is reset on failure, ice_fdir_teardown() cannot release
> them later either. The hash table name also stays registered, so the
> next FDIR setup for the device fails.
>
> Release everything set up so far on all error paths.
>
> Fixes: 1a2fc1799f09 ("net/ice: reject duplicated flow for flow director")
> Fixes: 0f880c3df192 ("net/ice: add flow director counter resource
> init/release")
> Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine")
Cc: [email protected]
>
> Signed-off-by: Anurag Mandal <[email protected]>
> ---
> drivers/net/intel/ice/ice_fdir_filter.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
Acked-by: Bruce Richardson <[email protected]>