[PATCH v6 11/13] KEYS: Pin the backing kernel module for a key type

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Nov 12 04:31:35 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/20261112040242.247168-1-jarkko@kernel.org?part=11




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