diff options
Diffstat (limited to 'security/keys')
-rw-r--r-- | security/keys/gc.c | 8 | ||||
-rw-r--r-- | security/keys/key.c | 2 | ||||
-rw-r--r-- | security/keys/keyctl.c | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/security/keys/gc.c b/security/keys/gc.c index 61ab7c82ebb1..d67c97bb1025 100644 --- a/security/keys/gc.c +++ b/security/keys/gc.c | |||
@@ -62,7 +62,7 @@ void key_schedule_gc(time_t gc_at) | |||
62 | 62 | ||
63 | if (gc_at <= now || test_bit(KEY_GC_REAP_KEYTYPE, &key_gc_flags)) { | 63 | if (gc_at <= now || test_bit(KEY_GC_REAP_KEYTYPE, &key_gc_flags)) { |
64 | kdebug("IMMEDIATE"); | 64 | kdebug("IMMEDIATE"); |
65 | queue_work(system_nrt_wq, &key_gc_work); | 65 | schedule_work(&key_gc_work); |
66 | } else if (gc_at < key_gc_next_run) { | 66 | } else if (gc_at < key_gc_next_run) { |
67 | kdebug("DEFERRED"); | 67 | kdebug("DEFERRED"); |
68 | key_gc_next_run = gc_at; | 68 | key_gc_next_run = gc_at; |
@@ -77,7 +77,7 @@ void key_schedule_gc(time_t gc_at) | |||
77 | void key_schedule_gc_links(void) | 77 | void key_schedule_gc_links(void) |
78 | { | 78 | { |
79 | set_bit(KEY_GC_KEY_EXPIRED, &key_gc_flags); | 79 | set_bit(KEY_GC_KEY_EXPIRED, &key_gc_flags); |
80 | queue_work(system_nrt_wq, &key_gc_work); | 80 | schedule_work(&key_gc_work); |
81 | } | 81 | } |
82 | 82 | ||
83 | /* | 83 | /* |
@@ -120,7 +120,7 @@ void key_gc_keytype(struct key_type *ktype) | |||
120 | set_bit(KEY_GC_REAP_KEYTYPE, &key_gc_flags); | 120 | set_bit(KEY_GC_REAP_KEYTYPE, &key_gc_flags); |
121 | 121 | ||
122 | kdebug("schedule"); | 122 | kdebug("schedule"); |
123 | queue_work(system_nrt_wq, &key_gc_work); | 123 | schedule_work(&key_gc_work); |
124 | 124 | ||
125 | kdebug("sleep"); | 125 | kdebug("sleep"); |
126 | wait_on_bit(&key_gc_flags, KEY_GC_REAPING_KEYTYPE, key_gc_wait_bit, | 126 | wait_on_bit(&key_gc_flags, KEY_GC_REAPING_KEYTYPE, key_gc_wait_bit, |
@@ -369,7 +369,7 @@ maybe_resched: | |||
369 | } | 369 | } |
370 | 370 | ||
371 | if (gc_state & KEY_GC_REAP_AGAIN) | 371 | if (gc_state & KEY_GC_REAP_AGAIN) |
372 | queue_work(system_nrt_wq, &key_gc_work); | 372 | schedule_work(&key_gc_work); |
373 | kleave(" [end %x]", gc_state); | 373 | kleave(" [end %x]", gc_state); |
374 | return; | 374 | return; |
375 | 375 | ||
diff --git a/security/keys/key.c b/security/keys/key.c index 4289c5ba2710..a30e92734905 100644 --- a/security/keys/key.c +++ b/security/keys/key.c | |||
@@ -591,7 +591,7 @@ void key_put(struct key *key) | |||
591 | key_check(key); | 591 | key_check(key); |
592 | 592 | ||
593 | if (atomic_dec_and_test(&key->usage)) | 593 | if (atomic_dec_and_test(&key->usage)) |
594 | queue_work(system_nrt_wq, &key_gc_work); | 594 | schedule_work(&key_gc_work); |
595 | } | 595 | } |
596 | } | 596 | } |
597 | EXPORT_SYMBOL(key_put); | 597 | EXPORT_SYMBOL(key_put); |
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 1ecc0f79906e..305ecb76519c 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c | |||
@@ -1496,7 +1496,6 @@ long keyctl_session_to_parent(void) | |||
1496 | oldwork = NULL; | 1496 | oldwork = NULL; |
1497 | parent = me->real_parent; | 1497 | parent = me->real_parent; |
1498 | 1498 | ||
1499 | task_lock(parent); | ||
1500 | /* the parent mustn't be init and mustn't be a kernel thread */ | 1499 | /* the parent mustn't be init and mustn't be a kernel thread */ |
1501 | if (parent->pid <= 1 || !parent->mm) | 1500 | if (parent->pid <= 1 || !parent->mm) |
1502 | goto unlock; | 1501 | goto unlock; |
@@ -1540,7 +1539,6 @@ long keyctl_session_to_parent(void) | |||
1540 | if (!ret) | 1539 | if (!ret) |
1541 | newwork = NULL; | 1540 | newwork = NULL; |
1542 | unlock: | 1541 | unlock: |
1543 | task_unlock(parent); | ||
1544 | write_unlock_irq(&tasklist_lock); | 1542 | write_unlock_irq(&tasklist_lock); |
1545 | rcu_read_unlock(); | 1543 | rcu_read_unlock(); |
1546 | if (oldwork) | 1544 | if (oldwork) |