[RFC PATCH 5/6] KEYS: Replace assoc_array with struct keyring_index

Jarkko Sakkinen jarkko at kernel.org
Fri Oct 16 22:27:36 UTC 2026


On Sat, Oct 17, 2026 at 12:53:03AM +0300, Jarkko Sakkinen wrote:
> -/*
> - * Finish unlinking a key from to a keyring.
> - */
> -static void __key_unlink_end(struct key *keyring,
> -			     struct key *key,
> -			     struct assoc_array_edit *edit)
> -	__releases(&keyring->sem)
> -{
> -	if (edit)
> -		assoc_array_cancel_edit(edit);
> -	up_write(&keyring->sem);
> -}
> -

This is the part that I'm particularly happy about because it would be
nice if teardown type of operations would not allocate new resources.
And it is also incompatible with OOM handler expectations, if not 
formal, at least intuitive.

Br, Jarkko



More information about the Linux-security-module-archive mailing list