X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=security%2Fkeys%2Fgc.c;h=3c90807476eb0e293a85940daff55c30bf636169;hb=8865dd756f92e6745cac64f4dd50e4dc3b9864cc;hp=671dd730ecfc9e62395b2a7bf046f76f0f9ad313;hpb=3b46a67af2eb8214a634a37c485146ca0ef42849;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/security/keys/gc.c b/security/keys/gc.c index 671dd73..3c90807 100644 --- a/security/keys/gc.c +++ b/security/keys/gc.c @@ -131,6 +131,11 @@ static noinline void key_gc_unused_keys(struct list_head *keys) kdebug("- %u", key->serial); key_check(key); +#ifdef CONFIG_KEY_NOTIFICATIONS + remove_watch_list(key->watchers, key->serial); + key->watchers = NULL; +#endif + /* Throw away the key data if the key is instantiated */ if (state == KEY_IS_POSITIVE && key->type->destroy) key->type->destroy(key);