aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 19:23:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-04 19:23:30 -0400
commit98959948a7ba33cf8c708626e0d2a1456397e1c6 (patch)
tree8ba9b6c2679a06e89f23bdd7018e9bb0249e3bda /security
parentef35ad26f8ff44d2c93e29952cdb336bda729d9d (diff)
parentcd3bd4e628a6d57d66afe77835fe8d93ae3e41f8 (diff)
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler updates from Ingo Molnar: - Move the nohz kick code out of the scheduler tick to a dedicated IPI, from Frederic Weisbecker. This necessiated quite some background infrastructure rework, including: * Clean up some irq-work internals * Implement remote irq-work * Implement nohz kick on top of remote irq-work * Move full dynticks timer enqueue notification to new kick * Move multi-task notification to new kick * Remove unecessary barriers on multi-task notification - Remove proliferation of wait_on_bit() action functions and allow wait_on_bit_action() functions to support a timeout. (Neil Brown) - Another round of sched/numa improvements, cleanups and fixes. (Rik van Riel) - Implement fast idling of CPUs when the system is partially loaded, for better scalability. (Tim Chen) - Restructure and fix the CPU hotplug handling code that may leave cfs_rq and rt_rq's throttled when tasks are migrated away from a dead cpu. (Kirill Tkhai) - Robustify the sched topology setup code. (Peterz Zijlstra) - Improve sched_feat() handling wrt. static_keys (Jason Baron) - Misc fixes. * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (37 commits) sched/fair: Fix 'make xmldocs' warning caused by missing description sched: Use macro for magic number of -1 for setparam sched: Robustify topology setup sched: Fix sched_setparam() policy == -1 logic sched: Allow wait_on_bit_action() functions to support a timeout sched: Remove proliferation of wait_on_bit() action functions sched/numa: Revert "Use effective_load() to balance NUMA loads" sched: Fix static_key race with sched_feat() sched: Remove extra static_key*() function indirection sched/rt: Fix replenish_dl_entity() comments to match the current upstream code sched: Transform resched_task() into resched_curr() sched/deadline: Kill task_struct->pi_top_task sched: Rework check_for_tasks() sched/rt: Enqueue just unthrottled rt_rq back on the stack in __disable_runtime() sched/fair: Disable runtime_enabled on dying rq sched/numa: Change scan period code to match intent sched/numa: Rework best node setting in task_numa_migrate() sched/numa: Examine a task move when examining a task swap sched/numa: Simplify task_numa_compare() sched/numa: Use effective_load() to balance NUMA loads ...
Diffstat (limited to 'security')
-rw-r--r--security/keys/gc.c11
-rw-r--r--security/keys/request_key.c23
2 files changed, 3 insertions, 31 deletions
diff --git a/security/keys/gc.c b/security/keys/gc.c
index d3222b6d7d59..9609a7f0faea 100644
--- a/security/keys/gc.c
+++ b/security/keys/gc.c
@@ -92,15 +92,6 @@ static void key_gc_timer_func(unsigned long data)
92} 92}
93 93
94/* 94/*
95 * wait_on_bit() sleep function for uninterruptible waiting
96 */
97static int key_gc_wait_bit(void *flags)
98{
99 schedule();
100 return 0;
101}
102
103/*
104 * Reap keys of dead type. 95 * Reap keys of dead type.
105 * 96 *
106 * We use three flags to make sure we see three complete cycles of the garbage 97 * We use three flags to make sure we see three complete cycles of the garbage
@@ -123,7 +114,7 @@ void key_gc_keytype(struct key_type *ktype)
123 schedule_work(&key_gc_work); 114 schedule_work(&key_gc_work);
124 115
125 kdebug("sleep"); 116 kdebug("sleep");
126 wait_on_bit(&key_gc_flags, KEY_GC_REAPING_KEYTYPE, key_gc_wait_bit, 117 wait_on_bit(&key_gc_flags, KEY_GC_REAPING_KEYTYPE,
127 TASK_UNINTERRUPTIBLE); 118 TASK_UNINTERRUPTIBLE);
128 119
129 key_gc_dead_keytype = NULL; 120 key_gc_dead_keytype = NULL;
diff --git a/security/keys/request_key.c b/security/keys/request_key.c
index 381411941cc1..26a94f18af94 100644
--- a/security/keys/request_key.c
+++ b/security/keys/request_key.c
@@ -21,24 +21,6 @@
21 21
22#define key_negative_timeout 60 /* default timeout on a negative key's existence */ 22#define key_negative_timeout 60 /* default timeout on a negative key's existence */
23 23
24/*
25 * wait_on_bit() sleep function for uninterruptible waiting
26 */
27static int key_wait_bit(void *flags)
28{
29 schedule();
30 return 0;
31}
32
33/*
34 * wait_on_bit() sleep function for interruptible waiting
35 */
36static int key_wait_bit_intr(void *flags)
37{
38 schedule();
39 return signal_pending(current) ? -ERESTARTSYS : 0;
40}
41
42/** 24/**
43 * complete_request_key - Complete the construction of a key. 25 * complete_request_key - Complete the construction of a key.
44 * @cons: The key construction record. 26 * @cons: The key construction record.
@@ -592,10 +574,9 @@ int wait_for_key_construction(struct key *key, bool intr)
592 int ret; 574 int ret;
593 575
594 ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT, 576 ret = wait_on_bit(&key->flags, KEY_FLAG_USER_CONSTRUCT,
595 intr ? key_wait_bit_intr : key_wait_bit,
596 intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); 577 intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
597 if (ret < 0) 578 if (ret)
598 return ret; 579 return -ERESTARTSYS;
599 if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) { 580 if (test_bit(KEY_FLAG_NEGATIVE, &key->flags)) {
600 smp_rmb(); 581 smp_rmb();
601 return key->type_data.reject_error; 582 return key->type_data.reject_error;