From b072e9bc2fe9aeff4e104e80e479160349f474a9 Mon Sep 17 00:00:00 2001 From: David Howells Date: Mon, 22 Aug 2011 14:09:20 +0100 Subject: 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 Signed-off-by: James Morris --- security/keys/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'security/keys/key.c') 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) 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); -- cgit v1.2.3-55-g7522