Из-за большого числа зарегистрированных пользователей максимальное количество персональных проектов ограничено до 3. Для снятия ограничений на количество проектов заполните форму присоединения к Openelbrus.

Skip to content
Snippets Groups Projects
Commit 23e9ef46 authored by Ahmed S. Darwish's avatar Ahmed S. Darwish Committed by Nobody
Browse files

net: xfrm: Use sequence counter with associated spinlock


A sequence counter write section must be serialized or its internal
state can get corrupted. A plain seqcount_t does not contain the
information of which lock must be held to guaranteee write side
serialization.

For xfrm_state_hash_generation, use seqcount_spinlock_t instead of plain
seqcount_t.  This allows to associate the spinlock used for write
serialization with the sequence counter. It thus enables lockdep to
verify that the write serialization lock is indeed held before entering
the sequence counter write section.

If lockdep is disabled, this lock association is compiled out and has
neither storage size nor runtime overhead.

Signed-off-by: default avatarAhmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 0332ac87
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment