netfilter: nft_set_hash: try later when GC hits EAGAIN on iteration
authorSasha Levin <sashal@kernel.org>
Fri, 22 Sep 2023 17:01:17 +0000 (19:01 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 29 Sep 2023 04:25:15 +0000 (05:25 +0100)
commit56379b76caf739b9c3f3fc7cda46e605452fa359
tree9e9eccf1a9ea71ffa91552902e942d58ea3b1780
parent37a532d343959f1d6f9e38c777e6fa2756771769
netfilter: nft_set_hash: try later when GC hits EAGAIN on iteration

commit b079155faae94e9b3ab9337e82100a914ebb4e8d upstream.

Skip GC run if iterator rewinds to the beginning with EAGAIN, otherwise GC
might collect the same element more than once.

Fixes: f6c383b8c31a ("netfilter: nf_tables: adapt set backend to use GC transaction API")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name netfilter-nft_set_hash-try-later-when-gc-hits-eagain.patch
net/netfilter/nft_set_hash.c