函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Schedule a process for later kill.* Uses GFP_ATOMIC allocations to avoid potential recursions in the VM.

函数原型:static void add_to_kill(struct task_struct *tsk, struct page *p, struct vm_area_struct *vma, struct list_head *to_kill)

返回类型:void

参数:

类型参数名称
struct task_struct *tsk
struct page *p
struct vm_area_struct *vma
struct list_head *to_kill
313  tk等于kmalloc(to_kill的长度, DOC: Useful GFP flag combinations* Useful GFP flag combinations* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Useful GFP flag combinations that are commonly used. It is recommended* that subsystems start with one of these combinations and then set/clear)
314  如果非tk
315  打印错误信息("Memory failure: Out of memory while machine check handling\n")
316  返回
319  addr等于At what user virtual address is page expected in vma?* Caller should check the page is actually part of the vma.
320  如果is_zone_device_page(p)则size_shift等于dev_pagemap_mapping_shift(p, vma)
322  否则size_shift等于Returns the number of bits needed for the number of bytes in a page
335  如果addr恒等于负EFAULT
336  打印信息("Memory failure: Unable to find user space address %lx in %s\n", page_to_pfn(p), comm)
338  否则如果size_shift恒等于0则
339  释放内存
340  返回
343  get_task_struct(tsk)
344  tsk等于tsk
345  添加链表项
调用者
名称描述
collect_procs_anonCollect processes when the error hit an anonymous page.
collect_procs_fileCollect processes when the error hit a file mapped page.