[RFC PATCH v2 03/11] dns_resolver: Clear .dns_resolver cache when the last client unloads

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Nov 4 03:03:03 UTC 2026


> dns_query() caches resolved dns_resolver keys into the module-owned
> .dns_resolver keyring until the TTL expires or module_exit() revokes the
> keyring.
> 
> Once live keys pin their key type, cached entries keep dns_resolver.ko
> pinned after its client modules unload.
> 
> Track active kernel client modules with dns_resolver_cache_get() and
> dns_resolver_cache_put(), and do the necessary plumbing for:
> 
> 1. nfsv4
> 2. cifs
> 3. libceph
> 4. kafs
> 
> When the last client unloads, clear .dns_resolver and flush key garbage
> collection so dns_resolver.ko can unload immediately.
> 
> 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=3




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