diff options
author | David Howells <dhowells@redhat.com> | 2011-08-22 09:09:20 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-08-22 19:57:36 -0400 |
commit | b072e9bc2fe9aeff4e104e80e479160349f474a9 (patch) | |
tree | 4f243698284aace64f4b5c9e5b9bee107c10e13b /security/keys/key.c | |
parent | 8bc16deabce7649e480e94b648c88d4e90c34352 (diff) |
KEYS: Make the key reaper non-reentrant
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>
Diffstat (limited to 'security/keys/key.c')
-rw-r--r-- | security/keys/key.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keys/key.c b/security/keys/key.c index 991a15f1e85f..1f3ed44a83c0 100644 --- a/security/keys/key.c +++ b/security/keys/key.c | |||
@@ -602,7 +602,7 @@ void key_put(struct key *key) | |||
602 | key_check(key); | 602 | key_check(key); |
603 | 603 | ||
604 | if (atomic_dec_and_test(&key->usage)) | 604 | if (atomic_dec_and_test(&key->usage)) |
605 | schedule_work(&key_gc_unused_work); | 605 | queue_work(system_nrt_wq, &key_gc_unused_work); |
606 | } | 606 | } |
607 | } | 607 | } |
608 | EXPORT_SYMBOL(key_put); | 608 | EXPORT_SYMBOL(key_put); |