diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 09:43:54 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2011-08-27 10:06:11 -0400 |
commit | 7b1bb388bc879ffcc6c69b567816d5c354afe42b (patch) | |
tree | 5a217fdfb0b5e5a327bdcd624506337c1ae1fe32 /include/linux/key.h | |
parent | 7d754596756240fa918b94cd0c3011c77a638987 (diff) | |
parent | 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff) |
Merge 'Linux v3.0' into Litmus
Some notes:
* Litmus^RT scheduling class is the topmost scheduling class
(above stop_sched_class).
* scheduler_ipi() function (e.g., in smp_reschedule_interrupt())
may increase IPI latencies.
* Added path into schedule() to quickly re-evaluate scheduling
decision without becoming preemptive again. This used to be
a standard path before the removal of BKL.
Conflicts:
Makefile
arch/arm/kernel/calls.S
arch/arm/kernel/smp.c
arch/x86/include/asm/unistd_32.h
arch/x86/kernel/smp.c
arch/x86/kernel/syscall_table_32.S
include/linux/hrtimer.h
kernel/printk.c
kernel/sched.c
kernel/sched_fair.c
Diffstat (limited to 'include/linux/key.h')
-rw-r--r-- | include/linux/key.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/include/linux/key.h b/include/linux/key.h index cd50dfa1d4c2..6ea4eebd3467 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | * | 10 | * |
11 | * | 11 | * |
12 | * See Documentation/keys.txt for information on keys/keyrings. | 12 | * See Documentation/security/keys.txt for information on keys/keyrings. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #ifndef _LINUX_KEY_H | 15 | #ifndef _LINUX_KEY_H |
@@ -170,6 +170,7 @@ struct key { | |||
170 | struct list_head link; | 170 | struct list_head link; |
171 | unsigned long x[2]; | 171 | unsigned long x[2]; |
172 | void *p[2]; | 172 | void *p[2]; |
173 | int reject_error; | ||
173 | } type_data; | 174 | } type_data; |
174 | 175 | ||
175 | /* key data | 176 | /* key data |
@@ -178,8 +179,9 @@ struct key { | |||
178 | */ | 179 | */ |
179 | union { | 180 | union { |
180 | unsigned long value; | 181 | unsigned long value; |
182 | void __rcu *rcudata; | ||
181 | void *data; | 183 | void *data; |
182 | struct keyring_list *subscriptions; | 184 | struct keyring_list __rcu *subscriptions; |
183 | } payload; | 185 | } payload; |
184 | }; | 186 | }; |
185 | 187 | ||
@@ -274,6 +276,23 @@ static inline key_serial_t key_serial(struct key *key) | |||
274 | return key ? key->serial : 0; | 276 | return key ? key->serial : 0; |
275 | } | 277 | } |
276 | 278 | ||
279 | /** | ||
280 | * key_is_instantiated - Determine if a key has been positively instantiated | ||
281 | * @key: The key to check. | ||
282 | * | ||
283 | * Return true if the specified key has been positively instantiated, false | ||
284 | * otherwise. | ||
285 | */ | ||
286 | static inline bool key_is_instantiated(const struct key *key) | ||
287 | { | ||
288 | return test_bit(KEY_FLAG_INSTANTIATED, &key->flags) && | ||
289 | !test_bit(KEY_FLAG_NEGATIVE, &key->flags); | ||
290 | } | ||
291 | |||
292 | #define rcu_dereference_key(KEY) \ | ||
293 | (rcu_dereference_protected((KEY)->payload.rcudata, \ | ||
294 | rwsem_is_locked(&((struct key *)(KEY))->sem))) | ||
295 | |||
277 | #ifdef CONFIG_SYSCTL | 296 | #ifdef CONFIG_SYSCTL |
278 | extern ctl_table key_sysctls[]; | 297 | extern ctl_table key_sysctls[]; |
279 | #endif | 298 | #endif |