summaryrefslogtreecommitdiffstats
path: root/Documentation/ide
diff options
context:
space:
mode:
authorAhmed S. Darwish <a.darwish@linutronix.de>2021-03-16 11:56:29 +0100
committerSteffen Klassert <steffen.klassert@secunet.com>2021-03-22 07:35:42 +0100
commite88add19f68191448427a6e4eb059664650a837f (patch)
tree1fac4eca5c1dd13969ea43793af3d92ce98e3031 /Documentation/ide
parentxfrm: Use actual socket sk instead of skb socket for xfrm_output_resume (diff)
downloadlinux-e88add19f68191448427a6e4eb059664650a837f.tar.xz
linux-e88add19f68191448427a6e4eb059664650a837f.zip
net: xfrm: Localize sequence counter per network namespace
A sequence counter write section must be serialized or its internal state can get corrupted. The "xfrm_state_hash_generation" seqcount is global, but its write serialization lock (net->xfrm.xfrm_state_lock) is instantiated per network namespace. The write protection is thus insufficient. To provide full protection, localize the sequence counter per network namespace instead. This should be safe as both the seqcount read and write sections access data exclusively within the network namespace. It also lays the foundation for transforming "xfrm_state_hash_generation" data type from seqcount_t to seqcount_LOCKNAME_t in further commits. Fixes: b65e3d7be06f ("xfrm: state: add sequence count to detect hash resizes") Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'Documentation/ide')
0 files changed, 0 insertions, 0 deletions