diff options
author | 2017-09-27 12:50:44 -0700 | |
---|---|---|
committer | 2017-10-18 09:12:41 +0100 | |
commit | 1823d475a5eeaa0f52789b1b7e2d31a592ae92ea (patch) | |
tree | 0cc97d27ac4815b342887b85d5b8f274dd3d4095 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | KEYS: don't let add_key() update an uninstantiated key (diff) | |
download | wireguard-linux-1823d475a5eeaa0f52789b1b7e2d31a592ae92ea.tar.xz wireguard-linux-1823d475a5eeaa0f52789b1b7e2d31a592ae92ea.zip |
KEYS: load key flags and expiry time atomically in key_validate()
In key_validate(), load the flags and expiry time once atomically, since
these can change concurrently if key_validate() is called without the
key semaphore held. And we don't want to get inconsistent results if a
variable is referenced multiple times. For example, key->expiry was
referenced in both 'if (key->expiry)' and in 'if (now.tv_sec >=
key->expiry)', making it theoretically possible to see a spurious
EKEYEXPIRED while the expiration time was being removed, i.e. set to 0.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions