struct mm_struct * mm = current->mm;
struct inode *inode;
vm_flags_t vm_flags;
- int error;
/*
* Does the application expect PROT_READ to imply PROT_EXEC?
}
}
- error = security_mmap_addr(addr);
- if (error)
- return error;
-
return mmap_region(file, addr, len, flags, vm_flags, pgoff);
}
if (addr & ~PAGE_MASK)
return -EINVAL;
- return arch_rebalance_pgtables(addr, len);
+ addr = arch_rebalance_pgtables(addr, len);
+ error = security_mmap_addr(addr);
+ return error ? error : addr;
}
EXPORT_SYMBOL(get_unmapped_area);
if (!len)
return addr;
- error = security_mmap_addr(addr);
- if (error)
- return error;
-
flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
error = get_unmapped_area(NULL, addr, len, 0, MAP_FIXED);
vma->vm_ops = &special_mapping_vmops;
vma->vm_private_data = pages;
- ret = security_mmap_addr(vma->vm_start);
- if (ret)
- goto out;
-
ret = insert_vm_struct(mm, vma);
if (ret)
goto out;
if ((addr <= new_addr) && (addr+old_len) > new_addr)
goto out;
- ret = security_mmap_addr(new_addr);
- if (ret)
- goto out;
-
ret = do_munmap(mm, new_addr, new_len);
if (ret)
goto out;
goto out;
}
- ret = security_mmap_addr(new_addr);
- if (ret)
- goto out;
ret = move_vma(vma, addr, old_len, new_len, new_addr);
}
out: