Function Report

Linux Kernel (v4.4)

Source File:include\linux\err.h Create Date:2016-01-14 09:04:38
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:ERR_PTR

Function:static inline void * ERR_PTR(long error)

Return Type:static inline void *

Parameter:

Type Parameter NameRemarks
long error

Function description:

25  Returning error
Caller
Function NameFunction description
frame_vector_pages
devm_memremap_pages
of_clk_get
of_clk_get_by_name
dma_request_slave_channel_reason
alloc_ts_config
dma_mark_declared_memory_occupied
fixed_phy_register
idr_replace replace pointer for given id
rhashtable_insert_slow
rhashtable_walk_next Return the next object and advance the iterator
ip_route_connect
assoc_array_insert Script insertion of an object into an associative array
assoc_array_delete Script deletion of an object from an associative array
assoc_array_clear Script deletion of all objects from an associative array
devm_gen_pool_create managed gen_pool_create
textsearch_prepare Prepare a search
fsm_init
fault_create_debugfs_attr
notifier_err_inject_init
hw_breakpoint_handlerHandle debug exception notifications.
ptrace_register_breakpoint
allocate_fake_cpuc
thermal_zone_of_sensor_register Function declarations
thermal_zone_device_register
thermal_cooling_device_register
thermal_of_cooling_device_register
thermal_zone_get_zone_by_name
get_thermal_instance
single_step_cont
rootfs_mount
mm_access
copy_processCreate a new process
ptrace_get_task_struct
alloc_pid
parse_argsArgs looks like"foo=bar,bar2 baz=fuz wiz".
create_kthread
kthread_create_on_node create a kthread.
create_new_namespacesCreate new nsproxy and all of its the associated namespaces. Return the newly created nsproxy. Do not attach this to the task, leave it to the caller to do proper locking and attach it to task.
sched_create_groupallocate runqueue etc for a new task group
cpu_cgroup_css_alloc
cpuacct_css_alloccreate a new cpu accounting group
get_highmem_page_buffer
get_buffer compute the address that snapshot_write_next() should set for its caller to write to.
wakelock_lookup_add
resolve_symbolResolve a symbol for this module. I.e. if we find one, record usage.
setup_load_infoSet up our basic convenience variables(pointers to section headers, search for module section index etc), and do some basic section verification.
layout_and_allocate
arch_kexec_kernel_image_load
kexec_purgatory_get_symbol_addr
cgroup_mount
cgroup_pidlist_startseq_file methods for the tasks/procs files. The seq_file position is the next pid to display; the seq_file iterator is a pointer to the pid in the cgroup->l->list array.
css_tryget_online_from_dir get corresponding css from a cgroup dentry
freezer_css_alloc
pids_css_alloc
cpuset_mountThis is ugly, but preserves the userspace API for existing cpuset users. If someone tries to mount the"cpuset" filesystem, we silently switch it to mount"cgroup" instead
cpuset_css_alloc allocate a cpuset css cgrp: control group that the new cpuset will be part of
clone_uts_nsClone a new ns copying an original utsname, setting refcount to 1
create_pid_namespace
copy_pid_ns
audit_unpack_stringUnpack a filter field's string representation from user-space buffer.
audit_to_entry_commonCommon user-space to kernel rule translation.
audit_data_to_entryTranslate struct audit_rule_data to kernel's rule respresentation.
audit_dupe_ruleDuplicate an audit rule. This will be a deep copy with the exception
audit_init_parentInitialize a parent watch entry.
audit_init_watchInitialize a watch entry.
audit_dupe_watchDuplicate the given audit watch. The new watch's rules list is initialized to an empty list and wlist is undefined.
audit_alloc_mark
kprobe_addrIf we have a symbol_name argument, look it up and add the offset field to it. This way, we can specify a relative address to a symbol. This returns encoded errors if it fails to look up symbol or invalid combination of parameters.
func_add
func_remove
rb_move_tailThis is the slow path, force gcc not to inline it.
s_startThe current tracer is copied to avoid a global locking all around.
__tracing_open
tracing_get_dentry
tracing_init_dentry initialize top level trace array
f_start
trigger_start
alloc_trace_kprobeAllocate new trace_probe and initialize it(including kprobes).
alloc_trace_uprobeAllocate new trace_uprobe and initialize it(including uprobes).
find_and_alloc_map
__bpf_map_getif error is returned, fd is released. On success caller should complete fd access with matching fdput()
__bpf_prog_get
htab_map_allocCalled from syscall
array_map_allocCalled from syscall
fd_array_map_alloc
prog_fd_array_get_ptr
perf_event_fd_array_get_ptr
find_lively_task_by_vpid
find_get_contextReturns a matching context with refcount and pincount.
perf_init_event
perf_event_allocAllocate and initialize a event structure
perf_event_create_kernel_counter
perf_event_get
perf_event_attrs
register_wide_hw_breakpoint register a wide breakpoint in the kernel
build_map_info
padata_get_next Get the next object that needs serialization.
devm_memremap
wait_on_page_read
__read_cache_page
do_read_cache_page
__shmem_file_setup
memdup_user duplicate memory region from user space
strndup_user duplicate an existing string from user space
vmstat_start
pcpu_build_alloc_info build alloc_info considering distances between CPUs
create_cache
no_page_table
follow_page_pte
__install_special_mapping
vma_to_resize
alloc_vmap_areaAllocate a region of KVA of the specified size and alignment, within the vstart and vend.
new_vmap_block allocates new vmap_block and occupies 2^order pages in this block. Of course pages number can't exceed VMAP_BBMAP_BITS
alloc_swap_info
alloc_huge_page
follow_huge_addrThese functions are overwritable if your architecture needs its own behavior.
mpol_newThis function just creates a new policy, does some check and simple initialization. You must invoke mpol_set_nodemask() to set nodes.
__mpol_dupSlow path of a mempolicy duplicate
follow_trans_huge_pmd
khugepaged_alloc_page
mem_cgroup_css_alloc
hugetlb_cgroup_css_alloc
kmemleak_seq_startIterate over the object_list and return the first valid object at or after the required position with its use_count incremented. The function triggers a memory scanning when the pos argument points to the first position.
ipc_obtain_object_idripc_obtain_object
ipc_lock lock an ipc structure without rwsem held
ipc_obtain_object_check
ipcctl_pre_down_nolock retrieve an ipc and check permissions for some IPC_XXX cmd
load_msg
copy_msg
expunge_all
pipelined_send
find_msg
do_msgrcv
sem_obtain_locksem_lock_(check_) routines are called in the paths where the rwsem is not held.
find_alloc_undo lookup(and if not present create) undo array
mqueue_get_inode
mqueue_mount
do_createInvoked when creating a new queue via sys_mq_open
do_openOpens existing queue
create_ipc_ns
bio_copy_user_iov copy user data to bio
bio_map_user_iov map user iovec into bio
bio_map_kern map kernel address into bio
bio_copy_kern copy kernel address into bio
__get_request get a free request
blk_make_request given a bio, allocate a corresponding struct request.
blk_mq_alloc_request
blk_mq_init_queue
blk_mq_init_allocated_queue
disk_seqf_start iterator
add_partition
check_partition
bsg_alloc_command
bsg_map_hdrmap sg_io_v4 to a request.
bsg_get_done_cmdGet a finished command from the done list
bsg_add_device
bsg_get_device
blkg_createIf@new_blkg is%NULL, this function tries to allocate a new one as necessary using%GFP_NOWAIT.@new_blkg is always consumed on return.
blkg_lookup_create lookup blkg, try to create one if not there
blkg_conf_prep parse and prepare for per-blkg config update
blkcg_css_alloc
sel_make_dirdeclaration for sel_make_class_dirs
smk_fetch Fetch the smack label from a file.
smk_parse_smack parse smack label from a text string
smk_import_entry import a label, return the list entry
aa_simple_write_to_buffer common routine for getting policy from user
aa_dfa_unpack unpack the binary tables of a serialized dfa
unpack_dfa unpack a file rule dfa
unpack_profile unpack a serialized profile
split_token_from_name separate a string of form^
init_desc
dentry_open
file_open_name open file and return file pointer
file_open_root
get_empty_filpFind an unused file structure and return a pointer to it. Returns an error pointer if some error happend e.g. we over file structures limit, run out of memory or operation is not permitted.
sget find or create a superblock
mount_ns
mount_bdev
mount_nodev
mount_single
mount_fs
__register_chrdev_regionRegister a single major with a specified minor range.
get_user_arg_ptr
do_open_execat
getname_flags
getname_kernel
get_link
lookup_dcacheThis looks up the name in dcache, possibly revalidates the old dentry and allocates a new one if not found or not valid. In the need_lookup argument returns whether i_op->lookup is necessary.
lookup_realCall i_op->lookup on the dentry. The dentry must be negative and unhashed.
path_init
trailing_symlink
filename_parentat
kern_path_lockeddoes lookup, returns the object with parent locked
lookup_one_len filesystem helper to lookup single pathname component
path_openat
do_filp_open
do_file_open_root
filename_create
__d_obtain_alias
d_add_ci lookup or allocate new dentry with case-exact name
d_hash_and_lookup hash the qstr then search for a dentry
d_splice_alias splice a disconnected dentry into the tree if one exists
__d_path return the path of a dentry
d_absolute_path
d_path return the path of a dentry
dynamic_dnameHelper function for dentry_operations.d_dname() members
simple_dname
__dentry_pathWrite full pathname from the root of the filesystem into the buffer.
dentry_path
bad_inode_lookup
lookup_mountpoint
new_mountpoint
vfs_kern_mount
clone_mnt
copy_tree
collect_mountsCaller should check returned pointer for errors
clone_private_mount create a private clone of a path
lock_mount
fs_set_subtype
alloc_mnt_ns
mount_subtree
simple_lookupLookup the data. This is trivial- if the dentry didn't already exist, we know it is negative. Set d_op to delete negative dentries.
mount_pseudoCommon helper for pseudo-filesystems(sockfs, pipefs, bdev- stuff that will never be mountable)
simple_transaction_get
alloc_anon_inodeA single inode exists for all anon_inode files. Contrary to pipes, anon_inode inodes have no associated per-instance data, so we need only allocate one of them.
empty_dir_lookupOperations for a permanently empty directory.
ns_get_path
proc_ns_fget
freeze_bdev lock a filesystem and force it into a consistent state
bd_start_claiming start claiming a block device
blkdev_get_by_path open a block device by name
blkdev_get_by_dev open a block device by device number
lookup_bdev lookup a struct block_device by name
dio_get_pageGet another userspace page. Returns an ERR_PTR on error. Pages are buffered inside the dio so that we can call get_user_pages() against a decent number of pages, less frequently. To provide nicer use of the L1 cache.
fsnotify_alloc_groupCreate a new fsnotify_group and hold a reference for the group returned.
get_one_eventGet an inotify_kernel_event if one exists and is small enough to fit in"count". Return an error pointer if not large enough.
inotify_new_group
get_one_eventGet an fsnotify notification event if one exists and is small enough to fit in"count". Return an error pointer if the count is not large enough.
create_fd
fanotify_add_new_mark
anon_inode_getfile creates a new file instance by hooking it up to an anonymous inode, and a dentry that describe the"class" of the file
eventfd_fget Acquire a reference of an eventfd file descriptor.
eventfd_ctx_fdget Acquires a reference to the internal eventfd context.
eventfd_ctx_fileget Acquires a reference to the internal eventfd context.
eventfd_file_create Creates an eventfd file pointer.
userfaultfd_file_create Creates an userfaultfd file pointer.
aio_private_file
ioctx_alloc Allocates and initializes an ioctx. Returns an ERR_PTR if it failed.
flock_make_lockFill in a file_lock structure with an appropriate FLOCK lock.
lease_allocAllocate a file_lock initialised to this type of lease
tun_get_socket
create_entryThis registers a new binary format, it recognises the syntax':name:type:offset:magic:mask:interpreter:flags' where the':' is the IFS, that can be chosen with the first char
__mb_cache_entry_find
posix_acl_from_modeCreate an ACL representing the file mode permission bits of an inode.
posix_acl_chmod
posix_acl_create
posix_acl_from_xattrConvert from extended attribute to in-memory representation.
get_vfsmount_from_fd
dqgetGet reference to dquot
quotactl_blocklook up a superblock on which quota ops will be performed- use the name of a block device to find the superblock thereon
SYSC_quotactl
m_start
m_start
proc_follow_link
proc_mount
proc_mem_open
proc_pid_follow_link
proc_map_files_follow_linkOnly allow CAP_SYS_ADMIN to follow the links, due to concerns about how the symlinks may be used to bypass permissions on ancestor directories in the path to the file in question.
proc_map_files_lookup
timers_start
proc_pident_lookup
proc_pid_lookup
proc_task_lookup
proc_lookup_deDon't create negative dentries here, return-ENOENT by hand instead.
proc_lookupfd_common
proc_ns_follow_link
proc_ns_dir_lookup
proc_self_follow_link
proc_setup_self
proc_thread_self_follow_link
proc_setup_thread_self
start_unregisteringcalled under sysctl_lock, will reacquire if has to wait
sysctl_head_grab
proc_sys_lookup
find_subdir
get_subdir find or create a subdir with the specified name.
proc_tgid_net_lookup
kernfs_mount_ns kernfs mount helper
kernfs_pin_sb try to pin the superblock associated with a kernfs_root
kernfs_create_root create a new kernfs hierarchy
kernfs_create_dir_ns create a directory
kernfs_create_empty_dir create an always empty directory
kernfs_iop_lookup
kernfs_seq_start
kernfs_seq_next
kernfs_seq_stop
__kernfs_create_file kernfs internal function to create a file
kernfs_create_link create a symlink
kernfs_iop_follow_link
sysfs_mount
configfs_new_direntAllocates a new configfs_dirent and links it to the parent configfs_dirent
configfs_lookup
configfs_mkdir
configfs_register_default_group allocates and registers a child group
configfs_follow_link
configfs_pin_fs
devpts_pty_new create a new inode in/dev/pts/
start_creating
debugfs_create_devm_seqfile create a debugfs file that is bound to device.
start_creating