函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\uprobes.c Create Date:2022-07-27 15:06:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:alloc_uprobe

函数原型:static struct uprobe *alloc_uprobe(struct inode *inode, loff_t offset, loff_t ref_ctr_offset)

返回类型:struct uprobe

参数:

类型参数名称
struct inode *inode
loff_toffset
loff_tref_ctr_offset
739  uprobe等于分配内存并置零
740  如果非uprobe则返回:NULL
743  Also hold a ref to inode 等于inode
744  offset等于offset
745  ref_ctr_offset等于ref_ctr_offset
746  init_rwsem( & register_rwsem)
747  init_rwsem( & consumer_rwsem)
750  cur_uprobe等于Acquire uprobes_treelock.* Matching uprobe already exists in rbtree;* increment (access refcount) and return the matching uprobe.* No matching uprobe; insert the uprobe in rb_tree;* get a double refcount (access + creation) and return NULL.
752  如果cur_uprobe
753  如果ref_ctr_offset不等于ref_ctr_offset
756  kfree(uprobe)
757  返回:错误号
759  kfree(uprobe)
760  uprobe等于cur_uprobe
763  返回:uprobe
调用者
名称描述
__uprobe_register__uprobe_register - register a probe*@inode: the file in which the probe has to be placed