提交 d199798b 编写于 作者: D David Howells 提交者: James Morris

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: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NJames Morris <jmorris@namei.org>
上级 b072e9bc
...@@ -51,7 +51,7 @@ void key_schedule_gc(time_t gc_at) ...@@ -51,7 +51,7 @@ void key_schedule_gc(time_t gc_at)
kenter("%ld", gc_at - now); kenter("%ld", gc_at - now);
if (gc_at <= now) { if (gc_at <= now) {
schedule_work(&key_gc_work); queue_work(system_nrt_wq, &key_gc_work);
} else if (gc_at < key_gc_next_run) { } else if (gc_at < key_gc_next_run) {
expires = jiffies + (gc_at - now) * HZ; expires = jiffies + (gc_at - now) * HZ;
mod_timer(&key_gc_timer, expires); mod_timer(&key_gc_timer, expires);
...@@ -65,7 +65,7 @@ static void key_gc_timer_func(unsigned long data) ...@@ -65,7 +65,7 @@ static void key_gc_timer_func(unsigned long data)
{ {
kenter(""); kenter("");
key_gc_next_run = LONG_MAX; key_gc_next_run = LONG_MAX;
schedule_work(&key_gc_work); queue_work(system_nrt_wq, &key_gc_work);
} }
/* /*
...@@ -206,7 +206,7 @@ static void key_gc_dead_links(struct work_struct *work) ...@@ -206,7 +206,7 @@ static void key_gc_dead_links(struct work_struct *work)
key_gc_new_timer = new_timer; key_gc_new_timer = new_timer;
key_gc_again = true; key_gc_again = true;
clear_bit(0, &key_gc_executing); clear_bit(0, &key_gc_executing);
schedule_work(&key_gc_work); queue_work(system_nrt_wq, &key_gc_work);
kleave(" [continue]"); kleave(" [continue]");
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册