[RFC PATCH v2 09/11] KEYS: Pin the backing kernel module for a key type
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Wed Nov 4 03:03:08 UTC 2026
> Add the owner field (populated with THIS_MODULE) to struct key_type.
>
> Pin the module in key_alloc() and keyring_restrict(), and release it in
> key_gc_unused_keys() and keyring_destroy(), which are wires to the keys
> and restrictions.
>
> Reject module owners still in MODULE_STATE_COMING so that the failed
> module_init() paths cannot leave behind referenced keys.
>
> Signed-off-by: Jarkko Sakkinen <jarkko at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103030226.2685251-1-jarkko@kernel.org?part=9
More information about the Linux-security-module-archive
mailing list