Re: [PATCH v3] keys: Protect the update method check against type removal

From: Eric Biggers

Date: Sun Nov 01 2026 - 17:15:31 EST


On Sat, Oct 31, 2026 at 05:26:36PM +0800, Cen Zhang wrote:
> Take key->sem before the first access to key->type and hold it until
> the preparsed payload has been freed. Once a key exists, only the GC
> changes key->type, and it does so with key->sem held for writing.

Reviewed-by: Eric Biggers <ebiggers@xxxxxxxxxx>

But it seems broken that a key type can be removed while keys of that
type still exist.

- Eric