Function Report

Linux Kernel (v4.4)

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

Function Name:IS_ERR

Function:static inline bool IS_ERR( const void *ptr)

Return Type:static inline bool

Parameter:

Type Parameter NameRemarks
const void * ptr

Function description:

35  Returning IS_ERR_VALUE
Caller
Function NameFunction description
PTR_ERR_OR_ZERO
__neigh_lookup
dst_neigh_lookup
dst_neigh_lookup_skb
seq_buf_path copy a path into the sequence buffer
alloc_tty_driverDEPRECATED Do not use this in new code, use tty_alloc_driver instead.(And change the return value checks.)
test_bucket_stats
test_rht_init
ip_route_connect
sw842_debugfs_create
sw842_debugfs_remove
textsearch_prepare Prepare a search
kmp_init
bm_init
fsm_init
err_inject_init
err_inject_init
err_inject_init
err_inject_init
digsig_verify digital signature verification with public key
digsig_init
blkcg_bio_issue_check
do_bounds
ptrace_write_dr7Handle ptrace writes to debug register 7.
ptrace_set_breakpoint_addr
validate_eventvalidate that we can schedule this event
validate_groupvalidate a single event group
microcode_init
msr_init
cpuid_init
apm_initJust start the APM thread. We do NOT want to do APM BIOS
kgdb_arch_late
add_pcspkr
copy_processCreate a new process
fork_idle
_do_forkfork routine
_cpu_upRequires cpu_add_remove_lock to be held
SYSC_ptrace
C_SYSC_ptrace
create_worker create a new workqueue worker
__alloc_workqueue_key
kthread_create_on_node create a kthread.
kthread_create_on_cpu Create a cpu bound 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.
copy_namespacesThis now handles copy for nsproxy and all namespaces therein
unshare_nsproxy_namespacesCalled from unshare. Unshare all the namespaces part of nsproxy. On success, returns the new nsproxy.
SYSC_setns
__smpboot_create_thread
cpu_cgroup_css_alloc
autogroup_create
snapshot_write_next used for writing the system memory snapshot.
save_image_lzo Save the suspend image data compressed with LZO.
load_image_lzo Load compressed image data and decompress them with LZO.
swsusp_check Check for swsusp signature in the resume device
swsusp_close close swap device.
pm_wake_lock
pm_wake_unlock
setup_irq_thread
rcu_spawn_tasks_kthreadSpawn rcu_tasks_kthread() at first call to call_rcu_tasks().
rcutorture_booster_init
rcu_spawn_gp_kthreadSpawn the kthreads that handle each RCU flavor's grace periods.
alarmtimer_init Initialize alarm timer code
resolve_symbol_wait
simplify_symbolsChange all symbols so that st_value encodes the pointer directly.
layout_and_allocate
load_moduleAllocate and load the module: note that size of section 0 is always zero, and we rely on this for optional sections.
acct_on
SYSC_acct
kimage_file_prepare_segmentsIn file mode list of segments is prepared by kernel. Copy relevant data from user space, do error checking, prepare segment list
kexec_calculate_store_digestsCalculate and store the digest of segments
cgroup_setup_root
cgroup_mount
cgroup_add_file
create_css create a cgroup_subsys_state
cgroup_mkdir
cgroup_init_subsys
audit_send_reply send an audit reply message via netlink
audit_receive_msg
audit_log_d_pathThis is a helper-function to print the escaped d_path
audit_data_to_entryTranslate struct audit_rule_data to kernel's rule respresentation.
audit_rule_change apply all rules to the specified message type
audit_list_rules_send list the audit rules
update_lsm_rule
audit_to_watchTranslate a watch string to kernel respresentation.
audit_dupe_watchDuplicate the given audit watch. The new watch's rules list is initialized to an empty list and wlist is undefined.
audit_update_watchUpdate inode info in audit rules based on filesystem event.
audit_get_ndGet path information necessary for adding watches.
audit_add_watchFind a matching watch entry, or add this one. Caller must hold audit_filter_mutex.
audit_watch_init
audit_dupe_exe
audit_alloc_mark
audit_fsnotify_init
audit_trim_trees
audit_launch_prune
audit_add_tree_rulecalled with audit_filter_mutex
audit_tag_tree
audit_tree_init
register_kprobe
tracepoint_add_funcAdd the probe function to a tracepoint.
tracepoint_remove_funcRemove a probe function from a tracepoint. Note: only waiting an RCU period after setting elem->call to the empty function insures that the original callback is not used anymore. This insured by preempt_disable around the call site.
ring_buffer_benchmark_init
tracing_open
tracing_dentry_percpu
trace_options_init_dentry
trace_automount
tracer_init_tracefs
tracing_stat_init
init_trace_printk_function_export
stack_trace_init
init_graph_tracefs
event_trace_init
create_trace_kprobe
init_kprobe_traceMake a tracefs interface for controlling probe points
create_trace_uprobeArgument syntax:- Add uprobe: p|r[:[GRP/]EVENT] PATH:OFFSET[FETCHARGS]
init_uprobe_traceMake a trace interface for controling probe points
ftrace_init_tracefs
find_and_alloc_map
map_createcalled via syscall
bpf_map_get_with_uref
map_lookup_elem
map_update_elem
map_delete_elem
map_get_next_key
bpf_prog_getcalled by sockets/tracing/seccomp before attaching program to an event pairs with bpf_prog_put()
replace_map_fd_with_map_ptrlook for pseudo eBPF instructions that access map FDs and replace them with actual map pointers
fd_array_map_update_elemonly called from syscall
prog_fd_array_get_ptr
perf_event_fd_array_get_ptr
perf_event_mmap_event
perf_event_set_filter
perf_event_set_bpf_prog
perf_event_allocAllocate and initialize a event structure
SYSC_perf_event_open
perf_event_create_kernel_counter
inherit_eventinherit a event from parent task to child task:
inherit_group
register_wide_hw_breakpoint register a wide breakpoint in the kernel
__copy_insn
register_for_each_vma
xol_add_vmaSlot allocation for XOL
_torture_create_kthreadCreate a generic torture kthread that is immediately runnable. If you need the kthread to be stopped so that you can do something to it before it starts, you will need to open-code your own.
wait_on_page_read
do_read_cache_page
kswapd_runThis kswapd start function will be called by init and node-hot-add. On node-hot-add, kswapd will moved to proper cpus if cpus are hot-added.
shmem_init
__shmem_file_setup
shmem_zero_setup setup a shared anonymous mapping
strndup_user duplicate an existing string from user space
bdi_class_init
bdi_register
pcpu_embed_first_chunk embed the first percpu chunk into bootmem
pcpu_page_first_chunk map the first chunk using PAGE_SIZE pages
kmem_cache_create Create a cache.
follow_page_mask look up a page descriptor from a user-virtual address
__get_user_pages pin user pages in memory
print_vma_addrPrint the name of a VMA.
munlock_vma_pages_range munlock all pages in the vma range.'
SYSC_mmap_pgoff
mremap_to
SYSC_mremap
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
vm_map_ram map pages linearly into kernel virtual address(vmalloc space)
__get_vm_area_node
process_vm_rw_core core of reading/writing pages from task specified
SYSC_swapoff
SYSC_swapon
alloc_huge_page_noerralloc_huge_page()'s wrapper which simply returns the page if allocation succeeds, otherwise NULL. This function is called from new_vma_page(), where no ERR_VALUE is expected to be returned.
hugetlb_cowHugetlb_cow() should be called with page lock of the original hugepage held.
hugetlb_no_page
vma_replace_policyApply policy to a single VMA This must be called with the mmap_sem held for writing.
do_set_mempolicySet the process memory policy
do_mbind
vma_dup_policy
sp_alloc
mpol_shared_policy_init initialize shared policy for inode
ksm_init
do_move_page_to_node_arrayMove a set of pages as indicated in the pm array. The addr field must be set to the virtual address of the page to be moved and the node number must contain a valid target node. The pm array ends with node= MAX_NUMNODES.
do_pages_stat_arrayDetermine the nodes of an array of pages and store it in an array of status.
start_stop_khugepaged
khugepaged_prealloc_page
memcg_write_event_controlDO NOT USE IN NEW FILES.
early_allocLog an early allocated block and populate the stack trace.
kmemleak_alloc register a newly allocated object
kmemleak_alloc_percpu register a newly allocated __percpu object
kmemleak_free unregister a previously registered object
kmemleak_free_part partially unregister a previously registered object
kmemleak_free_percpu unregister a previously registered __percpu object
kmemleak_not_leak mark an allocated object as false positive
kmemleak_ignore ignore an allocated object
kmemleak_scan_area limit the range to be scanned in an allocated object
kmemleak_no_scan do not scan an allocated object
start_scan_threadStart the automatic memory scanning thread. This function must be called with the scan_mutex held.
kmemleak_seq_stopDecrement the use_count of the last object required, if any.
pageowner_init
put_vaddr_frames drop references to pages if get_vaddr_frames() acquired them
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
msq_obtain_object
msq_obtain_object_check
msgctl_downThis function handles some msgctl commands which require the rwsem to be held in write mode. NOTE: no locks must be held, the rwsem is taken inside this function.
msgctl_nolock
do_msgsnd
prepare_copyThis function creates new kernel message structure, large enough to store bufsz message bytes.
do_msgrcv
sem_obtain_locksem_lock_(check_) routines are called in the paths where the rwsem is not held.
sem_obtain_object
sem_obtain_object_check
semctl_nolock
semctl_setval
semctl_main
semctl_downThis function handles some semctl commands which require the rwsem to be held in write mode. NOTE: no locks must be held, the rwsem is taken inside this function.
find_alloc_undo lookup(and if not present create) undo array
SYSC_semtimedop
exit_semadd semadj values to semaphores, free undo structures.
shm_obtain_object
shm_obtain_object_check
shm_lock_(check_) routines are called in the paths where the rwsem is not necessarily held.
newseg Create a new shared memory segment
shmctl_downThis function handles some shmctl commands which require the rwsem to be held in write mode. NOTE: no locks must be held, the rwsem is taken inside this function.
shmctl_nolock
SYSC_shmctl
do_shmatFix shmaddr, allocate descriptor, map shm, add attach descriptor to lists.
mqueue_fill_super
mqueue_create
SYSC_mq_open
SYSC_mq_unlink
SYSC_mq_timedsend
SYSC_mq_notify
mq_init_ns
get_request get a free request
blk_old_get_request
blk_make_request given a bio, allocate a corresponding struct request.
blk_queue_bio
blk_rq_map_user_iov map user data to a request, for REQ_TYPE_BLOCK_PC usage
blk_rq_map_kern map kernel data to a request, for REQ_TYPE_BLOCK_PC usage
blk_mq_init_queue
sg_io
sg_scsi_ioctl
__blk_send_genericSend basic block requests
rescan_partitions
read_dev_sector
bsg_map_hdrmap sg_io_v4 to a request.
bsg_complete_all_commands
__bsg_read
__bsg_write
bsg_get_device
bsg_open
bsg_ioctl
bsg_register_queue
bsg_init
blkg_lookup_create lookup blkg, try to create one if not there
blkg_conf_prep parse and prepare for per-blkg config update
blkcg_init_queue initialize blkcg part of request queue
selinux_genfs_get_sid
flush_unauthorized_filesDerived from fs/exec.c:flush_old_files.
selinux_transaction_write
sel_make_class_dir_entries
sel_make_classes
sel_fill_super
init_sel_fs
smack_set_mnt_opts set Smack specific mount options
smack_inode_setxattr Smack check for setting xattrs
smack_inode_post_setxattr Apply the Smack update approved above
smack_inode_setsecurity set smack xattrs
smack_d_instantiate Make sure the blob is correct on an inode
smack_setprocattr Smack process attribute setting
smack_audit_rule_init Initialize a smack audit rule
smk_import_entry import a label, return the list entry
smk_fill_rule Fill Smack rule from strings
smk_set_cipso do the work for write() for cipso and cipso2
smk_write_net4addr write() for/smack/netlabel
smk_write_ambient write() for/smack/ambient
smk_parse_label_list parse list of Smack labels, separated by spaces
smk_user_access handle access check transaction
smk_write_revoke_subj write() for/smack/revoke-subject
smk_write_syslog write() for smackfs/syslog
init_smk_fs get the smackfs superblock
profile_load.load file hook fn to load policy
profile_replace.replace file hook fn to load and/or replace policy
profile_remove.remove file hook fn to remove loaded policy
create_profile_file
__aa_fs_profile_mkdirrequires lock be held
__aa_fs_namespace_mkdir
aafs_create_file create a file entry in the apparmor securityfs
aafs_create_dir recursively create a directory entry in the securityfs
d_namespace_path lookup a name associated with a given path
unpack_dfa unpack a file rule dfa
unpack_profile unpack a serialized profile
aa_unpack unpack packed binary profile(s) data loaded from user space
aa_setprocattr_changehataa_setprocattr_chagnehat- handle procattr interface to change_hat
init_profile_hash
ima_fs_init
ima_init_crypto
ima_alloc_tfm
ima_alloc_atfm
ima_calc_file_ahash
ima_calc_file_shash
ima_calc_field_array_hash
ima_calc_boot_aggregate
ima_d_path
init_desc
evm_calc_hmac_or_hashCalculate the HMAC value across the set of protected security xattrs.
evm_init_hmac
evm_init_keyGet the key from the TPM for the SHA1-HMAC
evm_init_secfs
vfs_open open the file at the given path
dentry_open
filp_open open file and return file pointer
do_sys_open
alloc_file allocate and initialize a'struct file'
mount_ns
mount_bdev
mount_nodev
mount_single
mount_fs
register_chrdev_region register a range of device numbers
alloc_chrdev_region register a range of char device numbers
__register_chrdev create and register a cdev occupying a range of minors
countcounts the number of strings in array ARGV.
copy_strings' copies argument/environment strings from the old processes's memory to the new process's stack. The call to get_user_pages() ensures the destination page is created and not swapped out.
do_open_execat
open_exec
do_execveat_commonsys_execve() executes a new program.
create_pipe_files
init_pipe_fs
check_acl
follow_automountPerform an automount- return-EISDIR to tell follow_managed() to stop and return the path we were called with.
lookup_slowFast lookup failed, do it the slow way
link_path_walkName resolution. This is the basic name resolution function, turning a pathname into the final dentry. We expect'base' to be positive and a directory.
path_lookupatReturns 0 and nd will be valid on success; Retuns error, otherwise.
filename_lookup
path_parentatReturns 0 and nd will be valid on success; Retuns error, otherwise.
filename_parentat
kern_path_lockeddoes lookup, returns the object with parent locked
mountpoint_last look up last component for umount
path_mountpoint look up a path to be umounted
filename_mountpoint
atomic_openAttempt to atomically look up, create and open a file from a negative dentry.
lookup_openLook up and maybe create and open the last component.
path_openat
do_file_open_root
filename_create
SYSC_mknodat
SYSC_mkdirat
do_rmdir
do_unlinkatMake sure that the actual truncation of the file will occur outside its directory's i_mutex. Truncate can take a long time if there is a lot of writeout happening, and we don't want to prevent access to the directory while waiting on the I/O.
SYSC_symlinkat
SYSC_linkat
SYSC_renameat2
readlink_copy
generic_readlinkA helper for->readlink(). This should be used*ONLY* for symlinks that have->follow_link() touching nd only in nd_set_link(). Using(or not using) it for any given inode is up to filesystem.
page_getlinkget the link contents into pagecache
page_follow_link_light
__d_obtain_alias
d_splice_alias splice a disconnected dentry into the tree if one exists
dentry_path
vfs_kern_mount
mnt_clone_internal
copy_tree
collect_mountsCaller should check returned pointer for errors
clone_private_mount create a private clone of a path
lock_mount
do_loopbackdo loopback mount.
do_move_mount
do_add_mountadd a mount into a namespace's mount tree
do_new_mountcreate a new mount for userspace and request it to be added into the namespace's tree
copy_mnt_ns
create_mnt_ns creates a private namespace and adds a root filesystem
mount_subtree
SYSC_mount
SYSC_pivot_root
init_mount_tree
kern_mount_data
traverse
seq_read>read() method for sequential files.
seq_path seq_file interface to print a pathname
seq_path_rootSame as seq_path, but relative to supplied root.
seq_dentryreturns the path of the'dentry' from the root of its filesystem.
mount_pseudoCommon helper for pseudo-filesystems(sockfs, pipefs, bdev- stuff that will never be mountable)
simple_pin_fs
propagate_one
nsfs_init
bdev_cache_init
blkdev_get open a block device
blkdev_get_by_path open a block device by name
do_direct_IOWalk the user pages, and the file, mapping blocks to disk and generating a sequence of(page,offset,len,block) mappings. These mappings are injected into submit_page_section(), which takes care of the next stage of submission
fsnotify_mark_init
dnotify_init
inotify_read
inotify_new_group
SYSC_inotify_init1
create_fd
fanotify_read
fanotify_add_vfsmount_mark
fanotify_add_inode_mark
SYSC_fanotify_init
SYSC_epoll_create1
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
anon_inode_getfd creates a new file instance by hooking it up to an anonymous inode, and a dentry that describe the"class" of the file
anon_inode_init
eventfd_file_create Creates an eventfd file pointer.
SYSC_eventfd2
userfaultfd_file_create Creates an userfaultfd file pointer.
SYSC_userfaultfd
aio_private_file
aio_setup Creates the slab caches used by the aio routines, panic on failure as this is done early during the boot sequence.
aio_setup_ring
SYSC_io_setup
io_submit_one
__break_lease revoke all outstanding leases on file
do_fcntl_add_lease
SYSC_flock
C_SYSC_mount
load_em86
load_misc_binarythe loader itself
bm_register_write/register
load_script
load_elf_binary
load_elf_fdpic_binaryload an fdpic binary into various bits of memory
posix_acl_create
posix_acl_xattr_get
posix_acl_xattr_set
cn_print_exe_file
do_coredump
do_handle_to_path
do_handle_open
__dquot_initializeInitialize quota pointers in inode
dquot_transferWrapper for transferring ownership of an inode for uid/gid only Called from FSXXX_setattr()
dquot_quota_on_mountThis function is used when filesystem needs to initialize quotas during mount time.
dquot_get_dqblk
dquot_set_dqblk
quota_quotaon
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
maps_open
proc_maps_open
pagemap_open
proc_mount
pid_ns_prepare_proc
proc_pid_auxv
__mem_open
do_proc_readlink
proc_setup_self
proc_setup_thread_self
proc_sys_lookup
proc_sys_call_handler
proc_sys_open
proc_sys_poll
proc_sys_readdir
proc_sys_permission
proc_sys_getattr
get_subdir find or create a subdir with the specified name.
xlate_dir
sysctl_follow_link
insert_links
__register_sysctl_table register a leaf sysctl table
put_links
kernfs_mount_ns kernfs mount helper
sysfs_add_file_mode_ns
sysfs_create_dir_ns create a directory for an object with a namespace tag
sysfs_create_mount_point create an always empty directory
sysfs_do_create_link_sd
sysfs_mount
sysfs_init
internal_create_group
__compat_only_sysfs_link_entry_to_kobj add a symlink to a kobject pointing to a group or an attribute
configfs_make_dirent
configfs_depend_item
configfs_mkdir
configfs_dir_open
configfs_register_subsystem
init_devpts_fs
SYSC_lookup_dcookie
start_creating
debugfs_create_file create a file in the debugfs filesystem
debugfs_create_dir create a directory in the debugfs filesystem
debugfs_create_automount create automount point in the debugfs filesystem
debugfs_create_symlink create a symbolic link in the debugfs filesystem
debugfs_rename rename a file/directory in the debugfs filesystem
debugfs_create_devm_seqfile create a debugfs file that is bound to device.
start_creating
tracefs_create_file create a file in the tracefs filesystem
__create_dir