Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:replace_fd

Proto:int replace_fd(unsigned fd, struct file *file, unsigned flags)

Type:int

Parameter:

TypeParameterName
unsignedfd
struct file *file
unsignedflags
890  files = files
892  If Not file Then Return The same warnings as for __alloc_fd()/__fd_install() apply here...
895  If fd >= rlimit(RLIMIT_NOFILE) Then Return -EBADF
898  spin_lock( & written part on a separate cache line in SMP)
899  err = Expand files.* This function will expand the file structures, if the requested size exceeds* the current capacity and there is room for expansion.* Return <0 error code on error; 0 when nothing done; 1 when files were
900  If Value for the false possibility is greater at compile time(err < 0) Then Go to out_unlock
902  Return do_dup2(files, file, fd, flags)
904  out_unlock :
905  spin_unlock( & written part on a separate cache line in SMP)
906  Return err
Caller
NameDescribe
umh_pipe_setup
aa_inherit_filesased on selinux's flush_unauthorized_files
umh_pipe_setupmh_pipe_setup* helper function to customize the process used* to collect the core in userspace. Specifically* it sets up a pipe and installs it as fd 0 (stdin)* for the process. Returns 0 on success, or* PTR_ERR on failure.