函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Lookup and populate the error_injection_list.* For safety reasons we only allow certain functions to be overridden with* bpf_error_injection, so we need to populate the list of the symbols that have* been marked as safe for overriding.

函数原型:static void populate_error_injection_list(struct error_injection_entry *start, struct error_injection_entry *end, void *priv)

返回类型:void

参数:

类型参数名称
struct error_injection_entry *start
struct error_injection_entry *end
void *priv
63  offset等于0, size等于0
65  mutex_lock( & ei_mutex)
66 iter小于end循环
67  entry等于arch_deref_entry_point((void * )addr)
71  打印错误信息("Failed to find error inject entry at %p\n", (void * )entry)
73  继续下一循环
76  ent等于kmalloc(ent的长度, GFP_KERNEL)
77  如果非ent退出
79  start_addr等于entry
80  end_addr等于entrysize
81  etype等于etype
82  priv等于priv
83  初始化链表头
84  添加链表项
86  mutex_unlock( & ei_mutex)
调用者
名称描述
populate_kernel_ei_list
module_load_ei_list