函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__insert_uprobe

函数原型:static struct uprobe *__insert_uprobe(struct uprobe *uprobe)

返回类型:struct uprobe

参数:

类型参数名称
struct uprobe *uprobe
677  p等于rb_node
678  struct rb_node * parent = NULL
682 p循环
683  parent等于p
684  u等于rb_entry(parent, structuprobe, rb_node)
685  match等于match_uprobe(uprobe, u)
686  如果非match则返回:get_uprobe(u)
689  如果match小于0则p等于rb_left
691  否则p等于rb_right
696  u = NULL
697  rb_link_node( & node in the rb tree , parent, p)
698  rb_insert_color( & node in the rb tree , & uprobes_tree)
700  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
702  返回:u
调用者
名称描述
insert_uprobeAcquire 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.