Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-8] src/sys/netipsec
Module Name: src
Committed By: martin
Date: Mon Jul 22 18:07:07 UTC 2019
Modified Files:
src/sys/netipsec [netbsd-8]: key.c
Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1303):
sys/netipsec/key.c: revision 1.264
Avoid a race condition between SA (sav) manipulations
An sav can be removed from belonging list(s) twice resulting in an assertion
failure of pslist. It can occur if the following two operations interleave:
(i) a deletion or a update of an SA via the API, and
(ii) a state change (key_sa_chgstate) of the same SA by the timer.
Note that even (ii) removes an sav once from its list(s) on a update.
The cause of the race condition is that the two operations are not serialized
and (i) doesn't get and remove an sav from belonging list(s) atomically. So
(ii) can be inserted between an acquisition and a removal of (i).
Avoid the race condition by making (i) atomic.
To generate a diff of this commit:
cvs rdiff -u -r1.163.2.10 -r1.163.2.11 src/sys/netipsec/key.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index