diff options
author | David Howells <dhowells@redhat.com> | 2011-08-22 09:09:28 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-08-22 19:57:36 -0400 |
commit | d199798bdf969873f78d48140600ff0a98a87e69 (patch) | |
tree | fb0fbfe0eda27054eae9c9efe0240ace297c3661 /security | |
parent | b072e9bc2fe9aeff4e104e80e479160349f474a9 (diff) |
KEYS: The dead key link reaper should be non-reentrant
The dead key link reaper should be non-reentrant as it relies on global state
to keep track of where it's got to when it returns to the work queue manager to
give it some air.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/keys/gc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/keys/gc.c b/security/keys/gc.c index b23db3fbb32d..d67e88b791f2 100644 --- a/security/keys/gc.c +++ b/security/keys/gc.c | |||
@@ -51,7 +51,7 @@ void key_schedule_gc(time_t gc_at) | |||
51 | kenter("%ld", gc_at - now); | 51 | kenter("%ld", gc_at - now); |
52 | 52 | ||
53 | if (gc_at <= now) { | 53 | if (gc_at <= now) { |
54 | schedule_work(&key_gc_work); | 54 | queue_work(system_nrt_wq, &key_gc_work); |
55 | } else if (gc_at < key_gc_next_run) { | 55 | } else if (gc_at < key_gc_next_run) { |
56 | expires = jiffies + (gc_at - now) * HZ; | 56 | expires = jiffies + (gc_at - now) * HZ; |
57 | mod_timer(&key_gc_timer, expires); | 57 | mod_timer(&key_gc_timer, expires); |
@@ -65,7 +65,7 @@ static void key_gc_timer_func(unsigned long data) | |||
65 | { | 65 | { |
66 | kenter(""); | 66 | kenter(""); |
67 | key_gc_next_run = LONG_MAX; | 67 | key_gc_next_run = LONG_MAX; |
68 | schedule_work(&key_gc_work); | 68 | queue_work(system_nrt_wq, &key_gc_work); |
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
@@ -206,7 +206,7 @@ gc_released_our_lock: | |||
206 | key_gc_new_timer = new_timer; | 206 | key_gc_new_timer = new_timer; |
207 | key_gc_again = true; | 207 | key_gc_again = true; |
208 | clear_bit(0, &key_gc_executing); | 208 | clear_bit(0, &key_gc_executing); |
209 | schedule_work(&key_gc_work); | 209 | queue_work(system_nrt_wq, &key_gc_work); |
210 | kleave(" [continue]"); | 210 | kleave(" [continue]"); |
211 | return; | 211 | return; |
212 | 212 | ||