keys: Hoist locking out of __key_link_begin()

Hoist the locking of out of __key_link_begin() and into its callers.  This
is necessary to allow the upcoming key_move() operation to correctly order
taking of the source keyring semaphore, the destination keyring semaphore
and the keyring serialisation lock.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells 2019-05-30 11:37:39 +01:00
commit df593ee23e
4 changed files with 76 additions and 38 deletions