Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:iterate_fd

Proto:int iterate_fd(struct files_struct *files, unsigned n, int (*f)(const void *, struct file *, unsigned ), const void *p)

Type:int

Parameter:

TypeParameterName
struct files_struct *files
unsignedn
int (*f
const void *p
1001  res = 0
1002  If Not files Then Return 0
1004  spin_lock( & written part on a separate cache line in SMP)
1005  When n < max_fds cycle
1007  file = rcu_dereference_check_fdtable(files, current fd array [n])
1008  If Not file Then Continue
1010  res = f(p, file, n)
1011  If res Then Break
1014  spin_unlock( & written part on a separate cache line in SMP)
1015  Return res
Caller
NameDescribe
flush_unauthorized_filesDerived from fs/exec.c:flush_old_files.
aa_inherit_filesased on selinux's flush_unauthorized_files