Commit b072e9bc2fe9aeff4e104e80e479160349f474a9

Authored by David Howells
Committed by James Morris
1 parent 8bc16deabc

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -602,7 +602,7 @@
602 602 key_check(key);
603 603  
604 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 608 EXPORT_SYMBOL(key_put);