Alison Schofield <alison.schofield@xxxxxxxxx> wrote: > +void mktme_map_set_keyid(int keyid, unsigned int serial) > +{ > + mktme_map->serial[keyid] = serial; > + mktme_map->mapped_keyids++; > +} It appears that 'serial' should be key_serial_t. Note that you *aren't* allowed to cache key serial numbers inside the kernel. You must cache the struct key * instead and hold a reference to the key. This will prevent the key from being destroyed whilst it is in use. David