Skip to content

Commit

Permalink
KEYS: Make the key reaper non-reentrant
Browse files Browse the repository at this point in the history
Make the key reaper non-reentrant by sticking it on the appropriate system work
queue when we queue it.  This will allow it to have global state and drop
locks.  It should probably be non-reentrant already as it may spend a long time
holding the key serial spinlock, and so multiple entrants can spend long
periods of time just sitting there spinning, waiting to get the lock.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
David Howells authored and James Morris committed Aug 22, 2011
1 parent 8bc16de commit b072e9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/keys/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ void key_put(struct key *key)
key_check(key);

if (atomic_dec_and_test(&key->usage))
schedule_work(&key_gc_unused_work);
queue_work(system_nrt_wq, &key_gc_unused_work);
}
}
EXPORT_SYMBOL(key_put);
Expand Down

0 comments on commit b072e9b

Please sign in to comment.