Re: [PATCH] SUNRPC: Load the GSS module by OID only when the mechanism is missing

From: Chuck Lever

Date: Tue Nov 10 2026 - 12:45:10 EST


On Mon, 09 Nov 2026 22:09:47 -0500, Sasha Levin wrote:
> gss_mech_get_by_OID() calls request_module() before it looks at the
> list of registered mechanisms, so every lookup forks a modprobe, even
> when the mechanism is already registered or built in.
> gss_mech_get_by_name() and gss_mech_get_by_pseudoflavor() only load
> the module when the lookup fails.
>
> The read handler of /proc/net/rpc/gss_krb5_enctypes uses this lookup,
> so every read() of that file runs modprobe, two per cat. The file is
> present in every /proc/<pid>/net/rpc and /proc/<pid>/task/<tid>/net/rpc
> directory, and LTP read_all gives each read one second. On a slow board
> in KernelCI its workers stall on this file and the test times out.
>
> [...]

Applied to nfsd-testing, thanks!

[1/1] SUNRPC: Load the GSS module by OID only when the mechanism is missing
commit: f7ef2ce48812080b87572a2f0fdec93cb2d2a629

--
Chuck Lever <cel@xxxxxxxxxx>