函数逻辑报告 |
Source Code:kernel\fork.c |
Create Date:2022-07-27 09:57:12 |
Last Modify:2020-03-17 11:04:53 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:dup_mmap
函数原型:static __latent_entropy int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct mm_struct * | mm | |
struct mm_struct * | oldmm |
490 | uprobe_start_dup_mmap() |
491 | 如果down_write_killable( & mmap_sem)则 |
493 | 转到:fail_uprobe_end |
495 | flush_cache_dup_mm(oldmm) |
496 | uprobe_dup_mmap(oldmm, mm) |
511 | rb_parent = NULL |
512 | pprev等于 list of VMAs |
516 | retval等于khugepaged_fork(mm, oldmm) |
520 | prev = NULL |
524 | 如果Flags, see mm.h. 按位与Do not copy this vma on fork 则 |
525 | vm_stat_account(mm, Flags, see mm.h. , - vma_pages(mpnt)) |
526 | 继续下一循环 |
528 | charge等于0 |
533 | 如果fatal_signal_pending(当前进程)则 |
537 | 如果Flags, see mm.h. 按位与Is a VM accounted object 则 |
540 | 如果security_vm_enough_memory_mm(oldmm, len)则转到:fail_nomem |
544 | tmp等于vm_area_dup(mpnt) |
545 | 如果非tmp则转到:fail_nomem |
547 | retval等于vma_dup_policy(mpnt, tmp) |
548 | 如果retval则转到:fail_nomem_policy |
551 | retval等于dup_userfaultfd(tmp, & uf) |
552 | 如果retval则转到:fail_nomem_anon_vma_fork |
554 | 如果Flags, see mm.h. 按位与Wipe VMA contents in child. 则 |
556 | Serialized by page_table_lock = NULL |
557 | 如果anon_vma_prepare(tmp)则转到:fail_nomem_anon_vma_fork |
562 | linked list of VM areas per task, sorted by address = linked list of VM areas per task, sorted by address = NULL |
564 | 如果file则 |
565 | inode等于file_inode(file) |
569 | 如果Flags, see mm.h. 按位与ETXTBSY on write attempts.. 则atomic_dec( & i_writecount) |
571 | i_mmap_lock_write(mapping) |
572 | 如果Flags, see mm.h. 按位与VM_SHARED则atomic_inc( & i_mmap_writable) |
576 | vma_interval_tree_insert_after(tmp, mpnt, & i_mmap) |
598 | __vma_link_rb(mm, tmp, rb_link, rb_parent) |
602 | number of VMAs 自加 |
603 | 如果非Flags, see mm.h. 按位与Wipe VMA contents in child. 的值则retval等于copy_page_range(mm, oldmm, mpnt) |
613 | retval等于arch_dup_mmap(oldmm, mm) |
614 | out : |
616 | flush_tlb_mm(oldmm) |
618 | dup_userfaultfd_complete( & uf) |
619 | fail_uprobe_end : |
620 | uprobe_end_dup_mmap() |
621 | 返回:retval |
622 | fail_nomem_anon_vma_fork : |
623 | mpol_put(vma_policy(tmp)) |
624 | fail_nomem_policy : |
625 | vm_area_free(tmp) |
626 | fail_nomem : |
628 | vm_unacct_memory(charge) |
629 | 转到:out |
名称 | 描述 |
---|---|
dup_mm | dup_mm() - duplicates an existing mm structure*@tsk: the task_struct with which the new mm will be associated.*@oldmm: the mm to duplicate.* Allocates a new mm structure and duplicates the provided @oldmm structure* content into it. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |