]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit - net/xfrm/xfrm_state.c
xfrm: state: add sequence count to detect hash resizes
authorFlorian Westphal <fw@strlen.de>
Tue, 9 Aug 2016 10:16:07 +0000 (12:16 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 10 Aug 2016 09:23:24 +0000 (11:23 +0200)
commitb65e3d7be06fd8ff5236439254f338fe1a8d4bbd
treee9831de71641f57f8987811bdfd8b74b9cdbb438
parentdf7274eb70b7c8488170ebe8757dd94647a8e1e5
xfrm: state: add sequence count to detect hash resizes

Once xfrm_state_find is lockless we have to cope with a concurrent
resize opertion.

We use a sequence counter to block in case a resize is in progress
and to detect if we might have missed a state that got moved to
a new hash table.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c