tag | line | file | source code |
mpnt | 61 | arch/i386/ibcs/binfmt_elf.c | struct vm_area_struct *mpnt; |
mpnt | 63 | arch/i386/ibcs/binfmt_elf.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 64 | arch/i386/ibcs/binfmt_elf.c | if (mpnt) { |
mpnt | 65 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_task = current; |
mpnt | 66 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_start = PAGE_MASK & (unsigned long) p; |
mpnt | 67 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_end = TASK_SIZE; |
mpnt | 68 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_page_prot = PAGE_PRIVATE|PAGE_DIRTY; |
mpnt | 69 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_flags = VM_STACK_FLAGS; |
mpnt | 70 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_ops = NULL; |
mpnt | 71 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_inode = NULL; |
mpnt | 72 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_offset = 0; |
mpnt | 73 | arch/i386/ibcs/binfmt_elf.c | mpnt->vm_pte = 0; |
mpnt | 74 | arch/i386/ibcs/binfmt_elf.c | insert_vm_struct(current, mpnt); |
mpnt | 80 | fs/binfmt_elf.c | struct vm_area_struct *mpnt; |
mpnt | 82 | fs/binfmt_elf.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 83 | fs/binfmt_elf.c | if (mpnt) { |
mpnt | 84 | fs/binfmt_elf.c | mpnt->vm_task = current; |
mpnt | 85 | fs/binfmt_elf.c | mpnt->vm_start = PAGE_MASK & (unsigned long) p; |
mpnt | 86 | fs/binfmt_elf.c | mpnt->vm_end = TASK_SIZE; |
mpnt | 87 | fs/binfmt_elf.c | mpnt->vm_page_prot = PAGE_PRIVATE|PAGE_DIRTY; |
mpnt | 89 | fs/binfmt_elf.c | mpnt->vm_flags = VM_STACK_FLAGS; |
mpnt | 90 | fs/binfmt_elf.c | mpnt->vm_pte = 0; |
mpnt | 93 | fs/binfmt_elf.c | mpnt->vm_flags = VM_GROWSDOWN; |
mpnt | 96 | fs/binfmt_elf.c | mpnt->vm_inode = NULL; |
mpnt | 97 | fs/binfmt_elf.c | mpnt->vm_offset = 0; |
mpnt | 98 | fs/binfmt_elf.c | mpnt->vm_ops = NULL; |
mpnt | 99 | fs/binfmt_elf.c | insert_vm_struct(current, mpnt); |
mpnt | 101 | fs/binfmt_elf.c | current->mm->stk_vma = mpnt; |
mpnt | 301 | fs/exec.c | struct vm_area_struct *mpnt; |
mpnt | 303 | fs/exec.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 304 | fs/exec.c | if (mpnt) { |
mpnt | 305 | fs/exec.c | mpnt->vm_task = current; |
mpnt | 306 | fs/exec.c | mpnt->vm_start = PAGE_MASK & (unsigned long) p; |
mpnt | 307 | fs/exec.c | mpnt->vm_end = TASK_SIZE; |
mpnt | 308 | fs/exec.c | mpnt->vm_page_prot = PAGE_PRIVATE|PAGE_DIRTY; |
mpnt | 309 | fs/exec.c | mpnt->vm_flags = VM_STACK_FLAGS; |
mpnt | 310 | fs/exec.c | mpnt->vm_ops = NULL; |
mpnt | 311 | fs/exec.c | mpnt->vm_offset = 0; |
mpnt | 312 | fs/exec.c | mpnt->vm_inode = NULL; |
mpnt | 313 | fs/exec.c | mpnt->vm_pte = 0; |
mpnt | 314 | fs/exec.c | insert_vm_struct(current, mpnt); |
mpnt | 508 | fs/exec.c | struct vm_area_struct * mpnt, *mpnt1; |
mpnt | 522 | fs/exec.c | mpnt = current->mm->mmap; |
mpnt | 524 | fs/exec.c | while (mpnt) { |
mpnt | 525 | fs/exec.c | mpnt1 = mpnt->vm_next; |
mpnt | 526 | fs/exec.c | if (mpnt->vm_ops && mpnt->vm_ops->close) |
mpnt | 527 | fs/exec.c | mpnt->vm_ops->close(mpnt); |
mpnt | 528 | fs/exec.c | remove_shared_vm_struct(mpnt); |
mpnt | 529 | fs/exec.c | if (mpnt->vm_inode) |
mpnt | 530 | fs/exec.c | iput(mpnt->vm_inode); |
mpnt | 531 | fs/exec.c | kfree(mpnt); |
mpnt | 532 | fs/exec.c | mpnt = mpnt1; |
mpnt | 133 | fs/namei.c | struct vm_area_struct * mpnt; |
mpnt | 136 | fs/namei.c | for(mpnt = (*p)->mm->mmap; mpnt; mpnt = mpnt->vm_next) { |
mpnt | 137 | fs/namei.c | if (inode != mpnt->vm_inode) |
mpnt | 139 | fs/namei.c | if (mpnt->vm_flags & VM_DENYWRITE) |
mpnt | 359 | kernel/exit.c | struct vm_area_struct * mpnt; |
mpnt | 361 | kernel/exit.c | mpnt = current->mm->mmap; |
mpnt | 363 | kernel/exit.c | while (mpnt) { |
mpnt | 364 | kernel/exit.c | struct vm_area_struct * next = mpnt->vm_next; |
mpnt | 365 | kernel/exit.c | if (mpnt->vm_ops && mpnt->vm_ops->close) |
mpnt | 366 | kernel/exit.c | mpnt->vm_ops->close(mpnt); |
mpnt | 367 | kernel/exit.c | remove_shared_vm_struct(mpnt); |
mpnt | 368 | kernel/exit.c | if (mpnt->vm_inode) |
mpnt | 369 | kernel/exit.c | iput(mpnt->vm_inode); |
mpnt | 370 | kernel/exit.c | kfree(mpnt); |
mpnt | 371 | kernel/exit.c | mpnt = next; |
mpnt | 90 | kernel/fork.c | struct vm_area_struct * mpnt, **p, *tmp; |
mpnt | 94 | kernel/fork.c | for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) { |
mpnt | 98 | kernel/fork.c | *tmp = *mpnt; |
mpnt | 105 | kernel/fork.c | mpnt->vm_next_share = tmp; |
mpnt | 106 | kernel/fork.c | tmp->vm_prev_share = mpnt; |
mpnt | 810 | mm/memory.c | struct vm_area_struct * mpnt; |
mpnt | 824 | mm/memory.c | for (mpnt = area->vm_next_share; mpnt != area; mpnt = mpnt->vm_next_share) { |
mpnt | 826 | mm/memory.c | if (mpnt->vm_inode != inode) { |
mpnt | 831 | mm/memory.c | if ((mpnt->vm_offset ^ area->vm_offset) & ~PAGE_MASK) |
mpnt | 834 | mm/memory.c | from_address = offset + mpnt->vm_start - mpnt->vm_offset; |
mpnt | 835 | mm/memory.c | if (from_address < mpnt->vm_start || from_address >= mpnt->vm_end) |
mpnt | 838 | mm/memory.c | if (!try_to_share(address, area, from_address, mpnt, give_page)) |
mpnt | 223 | mm/mmap.c | struct vm_area_struct *mpnt; |
mpnt | 256 | mm/mmap.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 258 | mm/mmap.c | if (!mpnt) |
mpnt | 260 | mm/mmap.c | *mpnt = *area; |
mpnt | 261 | mm/mmap.c | mpnt->vm_offset += (end - area->vm_start); |
mpnt | 262 | mm/mmap.c | mpnt->vm_start = end; |
mpnt | 263 | mm/mmap.c | if (mpnt->vm_inode) |
mpnt | 264 | mm/mmap.c | mpnt->vm_inode->i_count++; |
mpnt | 265 | mm/mmap.c | if (mpnt->vm_ops && mpnt->vm_ops->open) |
mpnt | 266 | mm/mmap.c | mpnt->vm_ops->open(mpnt); |
mpnt | 268 | mm/mmap.c | insert_vm_struct(current, mpnt); |
mpnt | 272 | mm/mmap.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 273 | mm/mmap.c | if (!mpnt) |
mpnt | 275 | mm/mmap.c | *mpnt = *area; |
mpnt | 276 | mm/mmap.c | if (mpnt->vm_ops && mpnt->vm_ops->open) |
mpnt | 277 | mm/mmap.c | mpnt->vm_ops->open(mpnt); |
mpnt | 282 | mm/mmap.c | insert_vm_struct(current, mpnt); |
mpnt | 298 | mm/mmap.c | struct vm_area_struct *mpnt, **npp, *free; |
mpnt | 314 | mm/mmap.c | for (mpnt = *npp; mpnt != NULL; mpnt = *npp) { |
mpnt | 317 | mm/mmap.c | if ((addr < mpnt->vm_start && end <= mpnt->vm_start) || |
mpnt | 318 | mm/mmap.c | (addr >= mpnt->vm_end && end > mpnt->vm_end)) |
mpnt | 320 | mm/mmap.c | npp = &mpnt->vm_next; |
mpnt | 324 | mm/mmap.c | *npp = mpnt->vm_next; |
mpnt | 325 | mm/mmap.c | mpnt->vm_next = free; |
mpnt | 326 | mm/mmap.c | free = mpnt; |
mpnt | 341 | mm/mmap.c | mpnt = free; |
mpnt | 344 | mm/mmap.c | remove_shared_vm_struct(mpnt); |
mpnt | 346 | mm/mmap.c | st = addr < mpnt->vm_start ? mpnt->vm_start : addr; |
mpnt | 348 | mm/mmap.c | end = end > mpnt->vm_end ? mpnt->vm_end : end; |
mpnt | 350 | mm/mmap.c | if (mpnt->vm_ops && mpnt->vm_ops->unmap) |
mpnt | 351 | mm/mmap.c | mpnt->vm_ops->unmap(mpnt, st, end-st); |
mpnt | 353 | mm/mmap.c | unmap_fixup(mpnt, st, end-st); |
mpnt | 354 | mm/mmap.c | kfree(mpnt); |
mpnt | 367 | mm/mmap.c | struct vm_area_struct **p, *mpnt, *share; |
mpnt | 371 | mm/mmap.c | while ((mpnt = *p) != NULL) { |
mpnt | 372 | mm/mmap.c | if (mpnt->vm_start > vmp->vm_start) |
mpnt | 374 | mm/mmap.c | if (mpnt->vm_end > vmp->vm_start) |
mpnt | 376 | mm/mmap.c | p = &mpnt->vm_next; |
mpnt | 378 | mm/mmap.c | vmp->vm_next = mpnt; |
mpnt | 398 | mm/mmap.c | void remove_shared_vm_struct(struct vm_area_struct *mpnt) |
mpnt | 400 | mm/mmap.c | struct inode * inode = mpnt->vm_inode; |
mpnt | 405 | mm/mmap.c | if (mpnt->vm_next_share == mpnt) { |
mpnt | 406 | mm/mmap.c | if (inode->i_mmap != mpnt) |
mpnt | 412 | mm/mmap.c | if (inode->i_mmap == mpnt) |
mpnt | 413 | mm/mmap.c | inode->i_mmap = mpnt->vm_next_share; |
mpnt | 415 | mm/mmap.c | mpnt->vm_prev_share->vm_next_share = mpnt->vm_next_share; |
mpnt | 416 | mm/mmap.c | mpnt->vm_next_share->vm_prev_share = mpnt->vm_prev_share; |
mpnt | 424 | mm/mmap.c | void merge_segments(struct vm_area_struct *mpnt) |
mpnt | 428 | mm/mmap.c | if (mpnt == NULL) |
mpnt | 431 | mm/mmap.c | for(prev = mpnt, mpnt = mpnt->vm_next; |
mpnt | 432 | mm/mmap.c | mpnt != NULL; |
mpnt | 433 | mm/mmap.c | prev = mpnt, mpnt = next) |
mpnt | 435 | mm/mmap.c | next = mpnt->vm_next; |
mpnt | 440 | mm/mmap.c | if (mpnt->vm_inode != prev->vm_inode) |
mpnt | 442 | mm/mmap.c | if (mpnt->vm_pte != prev->vm_pte) |
mpnt | 444 | mm/mmap.c | if (mpnt->vm_ops != prev->vm_ops) |
mpnt | 446 | mm/mmap.c | if (mpnt->vm_page_prot != prev->vm_page_prot || |
mpnt | 447 | mm/mmap.c | mpnt->vm_flags != prev->vm_flags) |
mpnt | 449 | mm/mmap.c | if (prev->vm_end != mpnt->vm_start) |
mpnt | 454 | mm/mmap.c | if ((mpnt->vm_inode != NULL) || (mpnt->vm_flags & VM_SHM)) { |
mpnt | 455 | mm/mmap.c | if (prev->vm_offset + prev->vm_end - prev->vm_start != mpnt->vm_offset) |
mpnt | 464 | mm/mmap.c | prev->vm_end = mpnt->vm_end; |
mpnt | 465 | mm/mmap.c | prev->vm_next = mpnt->vm_next; |
mpnt | 466 | mm/mmap.c | if (mpnt->vm_ops && mpnt->vm_ops->close) { |
mpnt | 467 | mm/mmap.c | mpnt->vm_offset += mpnt->vm_end - mpnt->vm_start; |
mpnt | 468 | mm/mmap.c | mpnt->vm_start = mpnt->vm_end; |
mpnt | 469 | mm/mmap.c | mpnt->vm_ops->close(mpnt); |
mpnt | 471 | mm/mmap.c | remove_shared_vm_struct(mpnt); |
mpnt | 472 | mm/mmap.c | if (mpnt->vm_inode) |
mpnt | 473 | mm/mmap.c | mpnt->vm_inode->i_count--; |
mpnt | 474 | mm/mmap.c | kfree_s(mpnt, sizeof(*mpnt)); |
mpnt | 475 | mm/mmap.c | mpnt = prev; |