函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hwpoison_inject

函数原型:static int hwpoison_inject(void *data, u64 val)

返回类型:int

参数:

类型参数名称
void *data
u64val
16  pfn等于val
21  如果非操作权限检查则返回:负EPERM
24  如果非pfn_valid(pfn)则返回:负ENXIO
27  p等于pfn_to_page(pfn)
28  hpage等于compound_head(p)
32  如果非get_hwpoison_page() - Get refcount for memory error handling:*@page: raw error page (hit by memory error)* Return: return 0 if failed to grab the refcount, otherwise true (some* non-zero value.)则返回:0
35  如果非hwpoison_filter_enable则转到:inject
38  When a unknown page type is encountered drain as many buffers as possible* in the hope to turn the page into a LRU or free page, which we can handle.
42  如果非PageLRU(hpage)且非PageHuge() only returns true for hugetlbfs pages, but not for normal or* transparent huge pages. See the PageTransHuge() documentation for more* details.则转到:put_out
50  err等于hwpoison_filter(hpage)
51  如果err则转到:put_out
54  inject :
55  打印信息("Injecting memory failure at pfn %#lx\n", pfn)
56  返回:memory_failure - Handle memory failure of a page.*@pfn: Page Number of the corrupted page*@flags: fine tune action taken* This function is called by the low level machine check code* of an architecture when it detects hardware memory corruption* of a page
57  put_out :
58  put_hwpoison_page(p)
59  返回:0