+6
-5
include/linux/cred.h
+6
-5
include/linux/cred.h
···
265
265
/**
266
266
* current_cred - Access the current task's subjective credentials
267
267
*
268
-
* Access the subjective credentials of the current task.
268
+
* Access the subjective credentials of the current task. RCU-safe,
269
+
* since nobody else can modify it.
269
270
*/
270
271
#define current_cred() \
271
-
(current->cred)
272
+
(*(__force struct cred **)¤t->cred)
272
273
273
274
/**
274
275
* __task_cred - Access a task's objective credentials
···
308
307
({ \
309
308
struct user_struct *__u; \
310
309
struct cred *__cred; \
311
-
__cred = (struct cred *) current_cred(); \
310
+
__cred = current_cred(); \
312
311
__u = get_uid(__cred->user); \
313
312
__u; \
314
313
})
···
323
322
({ \
324
323
struct group_info *__groups; \
325
324
struct cred *__cred; \
326
-
__cred = (struct cred *) current_cred(); \
325
+
__cred = current_cred(); \
327
326
__groups = get_group_info(__cred->group_info); \
328
327
__groups; \
329
328
})
···
342
341
343
342
#define current_cred_xxx(xxx) \
344
343
({ \
345
-
current->cred->xxx; \
344
+
current_cred()->xxx; \
346
345
})
347
346
348
347
#define current_uid() (current_cred_xxx(uid))