tag | line | file | source code |
mpnt | 315 | fs/exec.c | struct vm_area_struct *mpnt; |
mpnt | 317 | fs/exec.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 318 | fs/exec.c | if (mpnt) { |
mpnt | 319 | fs/exec.c | mpnt->vm_task = current; |
mpnt | 320 | fs/exec.c | mpnt->vm_start = PAGE_MASK & (unsigned long) p; |
mpnt | 321 | fs/exec.c | mpnt->vm_end = TASK_SIZE; |
mpnt | 322 | fs/exec.c | mpnt->vm_page_prot = PAGE_PRIVATE|PAGE_DIRTY; |
mpnt | 323 | fs/exec.c | mpnt->vm_flags = VM_STACK_FLAGS; |
mpnt | 324 | fs/exec.c | mpnt->vm_share = NULL; |
mpnt | 325 | fs/exec.c | mpnt->vm_ops = NULL; |
mpnt | 326 | fs/exec.c | mpnt->vm_offset = 0; |
mpnt | 327 | fs/exec.c | mpnt->vm_inode = NULL; |
mpnt | 328 | fs/exec.c | mpnt->vm_pte = 0; |
mpnt | 329 | fs/exec.c | insert_vm_struct(current, mpnt); |
mpnt | 513 | fs/exec.c | struct vm_area_struct * mpnt, *mpnt1; |
mpnt | 529 | fs/exec.c | mpnt = current->mm->mmap; |
mpnt | 531 | fs/exec.c | while (mpnt) { |
mpnt | 532 | fs/exec.c | mpnt1 = mpnt->vm_next; |
mpnt | 533 | fs/exec.c | if (mpnt->vm_ops && mpnt->vm_ops->close) |
mpnt | 534 | fs/exec.c | mpnt->vm_ops->close(mpnt); |
mpnt | 535 | fs/exec.c | if (mpnt->vm_inode) |
mpnt | 536 | fs/exec.c | iput(mpnt->vm_inode); |
mpnt | 537 | fs/exec.c | kfree(mpnt); |
mpnt | 538 | fs/exec.c | mpnt = mpnt1; |
mpnt | 384 | fs/namei.c | struct vm_area_struct * mpnt; |
mpnt | 387 | fs/namei.c | for(mpnt = (*p)->mm->mmap; mpnt; mpnt = mpnt->vm_next) { |
mpnt | 388 | fs/namei.c | if (inode != mpnt->vm_inode) |
mpnt | 390 | fs/namei.c | if (mpnt->vm_page_prot & PAGE_RW) |
mpnt | 392 | fs/namei.c | if (mpnt->vm_flags & VM_DENYWRITE) { |
mpnt | 61 | ibcs/binfmt_elf.c | struct vm_area_struct *mpnt; |
mpnt | 63 | ibcs/binfmt_elf.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 64 | ibcs/binfmt_elf.c | if (mpnt) { |
mpnt | 65 | ibcs/binfmt_elf.c | mpnt->vm_task = current; |
mpnt | 66 | ibcs/binfmt_elf.c | mpnt->vm_start = PAGE_MASK & (unsigned long) p; |
mpnt | 67 | ibcs/binfmt_elf.c | mpnt->vm_end = TASK_SIZE; |
mpnt | 68 | ibcs/binfmt_elf.c | mpnt->vm_page_prot = PAGE_PRIVATE|PAGE_DIRTY; |
mpnt | 69 | ibcs/binfmt_elf.c | mpnt->vm_flags = VM_STACK_FLAGS; |
mpnt | 70 | ibcs/binfmt_elf.c | mpnt->vm_share = NULL; |
mpnt | 71 | ibcs/binfmt_elf.c | mpnt->vm_ops = NULL; |
mpnt | 72 | ibcs/binfmt_elf.c | mpnt->vm_inode = NULL; |
mpnt | 73 | ibcs/binfmt_elf.c | mpnt->vm_offset = 0; |
mpnt | 74 | ibcs/binfmt_elf.c | mpnt->vm_pte = 0; |
mpnt | 75 | ibcs/binfmt_elf.c | insert_vm_struct(current, mpnt); |
mpnt | 360 | kernel/exit.c | struct vm_area_struct * mpnt; |
mpnt | 362 | kernel/exit.c | mpnt = current->mm->mmap; |
mpnt | 364 | kernel/exit.c | while (mpnt) { |
mpnt | 365 | kernel/exit.c | struct vm_area_struct * next = mpnt->vm_next; |
mpnt | 366 | kernel/exit.c | if (mpnt->vm_ops && mpnt->vm_ops->close) |
mpnt | 367 | kernel/exit.c | mpnt->vm_ops->close(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 | 94 | kernel/fork.c | struct vm_area_struct * mpnt, **p, *tmp; |
mpnt | 98 | kernel/fork.c | for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) { |
mpnt | 102 | kernel/fork.c | *tmp = *mpnt; |
mpnt | 824 | mm/memory.c | struct vm_area_struct * mpnt; |
mpnt | 831 | mm/memory.c | for (mpnt = (*p)->mm->mmap; mpnt; mpnt = mpnt->vm_next) { |
mpnt | 833 | mm/memory.c | if (mpnt->vm_inode != inode) |
mpnt | 836 | mm/memory.c | if ((mpnt->vm_offset ^ area->vm_offset) & ~PAGE_MASK) |
mpnt | 839 | mm/memory.c | from_address = offset + mpnt->vm_start - mpnt->vm_offset; |
mpnt | 840 | mm/memory.c | if (from_address < mpnt->vm_start || from_address >= mpnt->vm_end) |
mpnt | 843 | mm/memory.c | if (!try_to_share(address, area, from_address, mpnt, give_page)) |
mpnt | 213 | mm/mmap.c | struct vm_area_struct *mpnt; |
mpnt | 246 | mm/mmap.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 248 | mm/mmap.c | if (!mpnt) |
mpnt | 250 | mm/mmap.c | *mpnt = *area; |
mpnt | 251 | mm/mmap.c | mpnt->vm_offset += (end - area->vm_start); |
mpnt | 252 | mm/mmap.c | mpnt->vm_start = end; |
mpnt | 253 | mm/mmap.c | if (mpnt->vm_inode) |
mpnt | 254 | mm/mmap.c | mpnt->vm_inode->i_count++; |
mpnt | 256 | mm/mmap.c | insert_vm_struct(current, mpnt); |
mpnt | 260 | mm/mmap.c | mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL); |
mpnt | 261 | mm/mmap.c | if (!mpnt) |
mpnt | 263 | mm/mmap.c | *mpnt = *area; |
mpnt | 264 | mm/mmap.c | insert_vm_struct(current, mpnt); |
mpnt | 280 | mm/mmap.c | struct vm_area_struct *mpnt, **npp, *free; |
mpnt | 296 | mm/mmap.c | for (mpnt = *npp; mpnt != NULL; mpnt = *npp) { |
mpnt | 299 | mm/mmap.c | if ((addr < mpnt->vm_start && end <= mpnt->vm_start) || |
mpnt | 300 | mm/mmap.c | (addr >= mpnt->vm_end && end > mpnt->vm_end)) |
mpnt | 302 | mm/mmap.c | npp = &mpnt->vm_next; |
mpnt | 306 | mm/mmap.c | *npp = mpnt->vm_next; |
mpnt | 307 | mm/mmap.c | mpnt->vm_next = free; |
mpnt | 308 | mm/mmap.c | free = mpnt; |
mpnt | 323 | mm/mmap.c | mpnt = free; |
mpnt | 326 | mm/mmap.c | st = addr < mpnt->vm_start ? mpnt->vm_start : addr; |
mpnt | 328 | mm/mmap.c | end = end > mpnt->vm_end ? mpnt->vm_end : end; |
mpnt | 330 | mm/mmap.c | if (mpnt->vm_ops && mpnt->vm_ops->unmap) |
mpnt | 331 | mm/mmap.c | mpnt->vm_ops->unmap(mpnt, st, end-st); |
mpnt | 333 | mm/mmap.c | unmap_fixup(mpnt, st, end-st); |
mpnt | 335 | mm/mmap.c | kfree(mpnt); |
mpnt | 370 | mm/mmap.c | struct vm_area_struct **p, *mpnt; |
mpnt | 373 | mm/mmap.c | while ((mpnt = *p) != NULL) { |
mpnt | 374 | mm/mmap.c | if (mpnt->vm_start > vmp->vm_start) |
mpnt | 376 | mm/mmap.c | if (mpnt->vm_end > vmp->vm_start) |
mpnt | 378 | mm/mmap.c | p = &mpnt->vm_next; |
mpnt | 380 | mm/mmap.c | vmp->vm_next = mpnt; |
mpnt | 389 | mm/mmap.c | void merge_segments(struct vm_area_struct *mpnt) |
mpnt | 393 | mm/mmap.c | if (mpnt == NULL) |
mpnt | 396 | mm/mmap.c | for(prev = mpnt, mpnt = mpnt->vm_next; |
mpnt | 397 | mm/mmap.c | mpnt != NULL; |
mpnt | 398 | mm/mmap.c | prev = mpnt, mpnt = next) |
mpnt | 400 | mm/mmap.c | next = mpnt->vm_next; |
mpnt | 405 | mm/mmap.c | if (mpnt->vm_inode != prev->vm_inode) |
mpnt | 407 | mm/mmap.c | if (mpnt->vm_pte != prev->vm_pte) |
mpnt | 409 | mm/mmap.c | if (mpnt->vm_ops != prev->vm_ops) |
mpnt | 411 | mm/mmap.c | if (mpnt->vm_page_prot != prev->vm_page_prot || |
mpnt | 412 | mm/mmap.c | mpnt->vm_flags != prev->vm_flags) |
mpnt | 414 | mm/mmap.c | if (prev->vm_end != mpnt->vm_start) |
mpnt | 419 | mm/mmap.c | if (mpnt->vm_inode != NULL) { |
mpnt | 420 | mm/mmap.c | if (prev->vm_offset + prev->vm_end - prev->vm_start != mpnt->vm_offset) |
mpnt | 429 | mm/mmap.c | prev->vm_end = mpnt->vm_end; |
mpnt | 430 | mm/mmap.c | prev->vm_next = mpnt->vm_next; |
mpnt | 431 | mm/mmap.c | if (mpnt->vm_ops && mpnt->vm_ops->close) { |
mpnt | 432 | mm/mmap.c | mpnt->vm_offset += mpnt->vm_end - mpnt->vm_start; |
mpnt | 433 | mm/mmap.c | mpnt->vm_start = mpnt->vm_end; |
mpnt | 434 | mm/mmap.c | mpnt->vm_ops->close(mpnt); |
mpnt | 436 | mm/mmap.c | if (mpnt->vm_inode) |
mpnt | 437 | mm/mmap.c | mpnt->vm_inode->i_count--; |
mpnt | 438 | mm/mmap.c | kfree_s(mpnt, sizeof(*mpnt)); |
mpnt | 439 | mm/mmap.c | mpnt = prev; |