Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyring.c Create Date:2022-07-28 18:18:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Lock keyrings for move (link/unlink combination).

Proto:int __key_move_lock(struct key *l_keyring, struct key *u_keyring, const struct keyring_index_key *index_key)__acquires(&l_keyring->sem) __acquires(&u_keyring->sem) __acquires(&keyring_serialise_link_lock)

Type:int

Parameter:

TypeParameterName
struct key *l_keyring
struct key *u_keyring
const struct keyring_index_key *index_key
1266  If type of key != key_type_keyring || type of key != key_type_keyring Then Return -ENOTDIR
1274  If l_keyring < u_keyring Then
1275  lock for writing
1276  down_write_nested( & change vs change sem , 1)
1277  Else
1278  lock for writing
1279  down_write_nested( & change vs change sem , 1)
1285  If type == key_type_keyring Then mutex_lock( & Semaphore to serialise link/link calls to prevent two link calls in parallel* introducing a cycle.)
1288  Return 0
Caller
NameDescribe
key_movekey_move - Move a key from one keyring to another*@key: The key to move*@from_keyring: The keyring to remove the link from