Module Name: src Committed By: ozaki-r Date: Wed Jul 17 07:07:59 UTC 2019
Modified Files: src/sys/netipsec: key.c Log Message: 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.263 -r1.264 src/sys/netipsec/key.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.