Skip to content
Commit 7604eb97 authored by Eric Biggers's avatar Eric Biggers
Browse files

KeyUtil: use static local variable in isFsKeyringSupported()

Use C++'s built-in mechanism for one-time initialization rather than
implement it ourselves in a way that isn't thread-safe.

(It doesn't *actually* need to be thread-safe, since all callers of this
run under ACQUIRE_CRYPT_LOCK.  But that's not easy to verify.)

Test: booted Cuttlefish and checked log for the one-time message
      "Detected support for FS_IOC_ADD_ENCRYPTION_KEY"
Change-Id: I6ca5b143ca305fa95144e388efc9657e3507bf05
parent 2d9777bf
Loading
Loading
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