Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / include / linux / cred.h
index ebbed2ce66379bd986fbf83f11e7ae8c32bf6070..abb2cd50f6b26ace7da7a554527087d4685d3e76 100644 (file)
@@ -76,21 +76,6 @@ extern int groups_search(const struct group_info *, kgid_t);
 extern int in_group_p(kgid_t);
 extern int in_egroup_p(kgid_t);
 
-/*
- * The common credentials for a thread group
- * - shared by CLONE_THREAD
- */
-#ifdef CONFIG_KEYS
-struct thread_group_cred {
-       atomic_t        usage;
-       pid_t           tgid;                   /* thread group process ID */
-       spinlock_t      lock;
-       struct key __rcu *session_keyring;      /* keyring inherited over fork */
-       struct key      *process_keyring;       /* keyring private to this process */
-       struct rcu_head rcu;                    /* RCU deletion hook */
-};
-#endif
-
 /*
  * The security context of a task
  *
@@ -139,6 +124,8 @@ struct cred {
 #ifdef CONFIG_KEYS
        unsigned char   jit_keyring;    /* default keyring to attach requested
                                         * keys to */
+       struct key __rcu *session_keyring; /* keyring inherited over fork */
+       struct key      *process_keyring; /* keyring private to this process */
        struct key      *thread_keyring; /* keyring private to this thread */
        struct key      *request_key_auth; /* assumed request_key authority */
        struct thread_group_cred *tgcred; /* thread-group shared credentials */
@@ -357,10 +344,8 @@ static inline void put_cred(const struct cred *_cred)
 extern struct user_namespace init_user_ns;
 #ifdef CONFIG_USER_NS
 #define current_user_ns()      (current_cred_xxx(user_ns))
-#define task_user_ns(task)     (task_cred_xxx((task), user_ns))
 #else
 #define current_user_ns()      (&init_user_ns)
-#define task_user_ns(task)     (&init_user_ns)
 #endif