|
@@ -277,17 +277,13 @@ static inline void put_cred(const struct cred *_cred)
|
|
* @task: The task to query
|
|
* @task: The task to query
|
|
*
|
|
*
|
|
* Access the objective credentials of a task. The caller must hold the RCU
|
|
* Access the objective credentials of a task. The caller must hold the RCU
|
|
- * readlock or the task must be dead and unable to change its own credentials.
|
|
|
|
|
|
+ * readlock.
|
|
*
|
|
*
|
|
* The result of this function should not be passed directly to get_cred();
|
|
* The result of this function should not be passed directly to get_cred();
|
|
* rather get_task_cred() should be used instead.
|
|
* rather get_task_cred() should be used instead.
|
|
*/
|
|
*/
|
|
-#define __task_cred(task) \
|
|
|
|
- ({ \
|
|
|
|
- const struct task_struct *__t = (task); \
|
|
|
|
- rcu_dereference_check(__t->real_cred, \
|
|
|
|
- task_is_dead(__t)); \
|
|
|
|
- })
|
|
|
|
|
|
+#define __task_cred(task) \
|
|
|
|
+ rcu_dereference((task)->real_cred)
|
|
|
|
|
|
/**
|
|
/**
|
|
* get_current_cred - Get the current task's subjective credentials
|
|
* get_current_cred - Get the current task's subjective credentials
|