Re: [PATCH v6] KEYS: Protect pkey method checks against type removal

From: Jarkko Sakkinen

Date: Mon Nov 09 2026 - 20:55:35 EST


On Mon, Nov 09, 2026 at 01:52:04PM +0800, Yuansheng Yang wrote:
> diff --git a/security/keys/keyctl_pkey.c b/security/keys/keyctl_pkey.c
> index 15b6bf6399..5ac049b71a 100644
> --- a/security/keys/keyctl_pkey.c
> +++ b/security/keys/keyctl_pkey.c
> @@ -100,9 +100,6 @@ static int keyctl_pkey_params_get(key_serial_t id,
> return PTR_ERR(key_ref);
> params->key = key_ref_to_ptr(key_ref);
>
> - if (!params->key->type->asym_query)
> - return -EOPNOTSUPP;
> -
> return 0;
> }

I think I asked to remove this. I need to revoke my reviewed-by from
this version.

It's not relevant for the bug fix.

Also if possible try to make a bit more compact description of the
fix. I did not ask this for reviewed patch because did not see it
relevant enough but now that this needs a new round, you could
address this part too.

Br, Jarkko