Skip to content

ipset patch to fix region locking

Jozsef Kadlecsik netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1netfilter: ipset: fix region locking in hash typesnet/netfilter/ipset/ip_set_hash_gen.h+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] ipset patch to fix region locking

Hi Pablo,

Please apply the next patch which fixes the region locking in the hash type of sets.

Region locking was introduced to break up operation on the whole hashes into smaller parts in order to avoid to keep the locking too long continuously. That required three macros: two to calculate the start and end buckets belonging to a region lock and a third one to give back the region lock of a given hash bucket. The third one was incorrect which can lead to a race condition between the internal garbage collector and adding new entries to the hash simultaneously.

The bug affects all hash types, since the region locking was introduced and it was reported by Kota Toda <[email protected]>.

Best regards,
Jozsef

The following changes since commit 3e52667a9c328b3d1a1ddbbb6b8fbf63a217bda3:

Merge branch 'lan78xx-phylink-prep' (2025-05-07 12:57:06 +0100)

are available in the Git repository at:

git://blackhole.kfki.hu/nf-next e2b52b09f1166fce2

for you to fetch changes up to e2b52b09f1166fce29f4888ad9b86a7cfec7ad8a:

netfilter: ipset: fix region locking in hash types (2025-05-07 16:48:30 +0200)

----------------------------------------------------------------
Jozsef Kadlecsik (1):
netfilter: ipset: fix region locking in hash types

 net/netfilter/ipset/ip_set_hash_gen.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)