Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\fdtable.h Create Date:2022-07-28 05:59:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:The caller must ensure that fd table isn't shared or hold rcu or file lock

Proto:static inline struct file *__fcheck_files(struct files_struct *files, unsigned int fd)

Type:struct file

Parameter:

TypeParameterName
struct files_struct *files
unsigned intfd
84  fdt = Dependency order vs. p above. (fdt)
86  If fd < max_fds Then
87  fd = array_index_nospec - sanitize an array index after a bounds check* For a code sequence like:* if (index < size) {* index = array_index_nospec(index, size);* val = array[index];* }* (fd, max_fds)
88  Return Dependency order vs. p above. ( current fd array [fd])
90  Return NULL
Caller
NameDescribe
__fget_lightLightweight file lookup - no refcnt increment if fd table isn't shared.* You can use this instead of fget if you satisfy all of the following* conditions:* 1) You must call fput_light before exiting the syscall and returning control* to userspace (i