Skip to content

Commit

Permalink
KEYS: The dead key link reaper should be non-reentrant
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
dhowells authored and James Morris committed Aug 22, 2011
1 parent b072e9b commit d199798
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions security/keys/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void key_schedule_gc(time_t gc_at)
kenter("%ld", 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) {
expires = jiffies + (gc_at - now) * HZ;
mod_timer(&key_gc_timer, expires);
Expand All @@ -65,7 +65,7 @@ static void key_gc_timer_func(unsigned long data)
{
kenter("");
key_gc_next_run = LONG_MAX;
schedule_work(&key_gc_work);
queue_work(system_nrt_wq, &key_gc_work);
}

/*
Expand Down Expand Up @@ -206,7 +206,7 @@ static void key_gc_dead_links(struct work_struct *work)
key_gc_new_timer = new_timer;
key_gc_again = true;
clear_bit(0, &key_gc_executing);
schedule_work(&key_gc_work);
queue_work(system_nrt_wq, &key_gc_work);
kleave(" [continue]");
return;

Expand Down

0 comments on commit d199798

Please sign in to comment.