aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-05-24 08:55:24 -0400
committerJames Morris <jmorris@namei.org>2011-05-24 08:55:24 -0400
commit434d42cfd05a7cc452457a81d2029540cba12150 (patch)
tree3a6b9b7f9ff2e1b7409dd66c15242b2a75aa4422 /include
parentd762f4383100c2a87b1a3f2d678cd3b5425655b4 (diff)
parent12a5a2621b1ee14d32beca35304d7c6076a58815 (diff)
Merge branch 'next' into for-linus
Diffstat (limited to 'include')
-rw-r--r--include/linux/capability.h5
-rw-r--r--include/linux/init_task.h7
-rw-r--r--include/linux/key.h13
-rw-r--r--include/linux/kmod.h3
4 files changed, 16 insertions, 12 deletions
diff --git a/include/linux/capability.h b/include/linux/capability.h
index 4554db0cde86..c42112350003 100644
--- a/include/linux/capability.h
+++ b/include/linux/capability.h
@@ -417,7 +417,6 @@ extern const kernel_cap_t __cap_init_eff_set;
417 417
418# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }}) 418# define CAP_EMPTY_SET ((kernel_cap_t){{ 0, 0 }})
419# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) 419# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }})
420# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }})
421# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ 420# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \
422 | CAP_TO_MASK(CAP_LINUX_IMMUTABLE), \ 421 | CAP_TO_MASK(CAP_LINUX_IMMUTABLE), \
423 CAP_FS_MASK_B1 } }) 422 CAP_FS_MASK_B1 } })
@@ -427,11 +426,7 @@ extern const kernel_cap_t __cap_init_eff_set;
427 426
428#endif /* _KERNEL_CAPABILITY_U32S != 2 */ 427#endif /* _KERNEL_CAPABILITY_U32S != 2 */
429 428
430#define CAP_INIT_INH_SET CAP_EMPTY_SET
431
432# define cap_clear(c) do { (c) = __cap_empty_set; } while (0) 429# define cap_clear(c) do { (c) = __cap_empty_set; } while (0)
433# define cap_set_full(c) do { (c) = __cap_full_set; } while (0)
434# define cap_set_init_eff(c) do { (c) = __cap_init_eff_set; } while (0)
435 430
436#define cap_raise(c, flag) ((c).cap[CAP_TO_INDEX(flag)] |= CAP_TO_MASK(flag)) 431#define cap_raise(c, flag) ((c).cap[CAP_TO_INDEX(flag)] |= CAP_TO_MASK(flag))
437#define cap_lower(c, flag) ((c).cap[CAP_TO_INDEX(flag)] &= ~CAP_TO_MASK(flag)) 432#define cap_lower(c, flag) ((c).cap[CAP_TO_INDEX(flag)] &= ~CAP_TO_MASK(flag))
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 689496bb6654..bafc58c00fc3 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -83,13 +83,6 @@ extern struct group_info init_groups;
83#define INIT_IDS 83#define INIT_IDS
84#endif 84#endif
85 85
86/*
87 * Because of the reduced scope of CAP_SETPCAP when filesystem
88 * capabilities are in effect, it is safe to allow CAP_SETPCAP to
89 * be available in the default configuration.
90 */
91# define CAP_INIT_BSET CAP_FULL_SET
92
93#ifdef CONFIG_RCU_BOOST 86#ifdef CONFIG_RCU_BOOST
94#define INIT_TASK_RCU_BOOST() \ 87#define INIT_TASK_RCU_BOOST() \
95 .rcu_boost_mutex = NULL, 88 .rcu_boost_mutex = NULL,
diff --git a/include/linux/key.h b/include/linux/key.h
index b2bb01719561..ef19b99aff98 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -276,6 +276,19 @@ static inline key_serial_t key_serial(struct key *key)
276 return key ? key->serial : 0; 276 return key ? key->serial : 0;
277} 277}
278 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 */
286static 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
279#define rcu_dereference_key(KEY) \ 292#define rcu_dereference_key(KEY) \
280 (rcu_dereference_protected((KEY)->payload.rcudata, \ 293 (rcu_dereference_protected((KEY)->payload.rcudata, \
281 rwsem_is_locked(&((struct key *)(KEY))->sem))) 294 rwsem_is_locked(&((struct key *)(KEY))->sem)))
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 310231823852..d4a5c84c503d 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -24,6 +24,7 @@
24#include <linux/errno.h> 24#include <linux/errno.h>
25#include <linux/compiler.h> 25#include <linux/compiler.h>
26#include <linux/workqueue.h> 26#include <linux/workqueue.h>
27#include <linux/sysctl.h>
27 28
28#define KMOD_PATH_LEN 256 29#define KMOD_PATH_LEN 256
29 30
@@ -109,6 +110,8 @@ call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait)
109 NULL, NULL, NULL); 110 NULL, NULL, NULL);
110} 111}
111 112
113extern struct ctl_table usermodehelper_table[];
114
112extern void usermodehelper_init(void); 115extern void usermodehelper_init(void);
113 116
114extern int usermodehelper_disable(void); 117extern int usermodehelper_disable(void);