Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\user.c Create Date:2022-07-28 09:14:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Locate the user_struct for the passed UID. If found, take a ref on it. The* caller must undo that ref with free_uid().* If the user_struct could not be found, return NULL.

Proto:struct user_struct *find_user(kuid_t uid)

Type:struct user_struct

Parameter:

TypeParameterName
kuid_tuid
158  spin_lock_irqsave( & The uidhash_lock is mostly taken from process context, but it is* occasionally also taken from softirq/tasklet context, when* task-structs get RCU-freed, flags)
159  ret = uid_hash_find(uid, uidhashentry(uid))
160  spin_unlock_irqrestore( & The uidhash_lock is mostly taken from process context, but it is* occasionally also taken from softirq/tasklet context, when* task-structs get RCU-freed, flags)
161  Return ret
Caller
NameDescribe
SYSCALL_DEFINE3
SYSCALL_DEFINE2Ugh. To avoid negative return values, "getpriority()" will* not return the normal nice-value, but a negated value that* has been offset by 20 (ie it returns 40..1 instead of -20..19)* to stay compatible.
SYSCALL_DEFINE2