Page MenuHomeFreeBSD

D20795.id.diff
No OneTemporary

D20795.id.diff

Index: head/sys/vm/vm_mmap.c
===================================================================
--- head/sys/vm/vm_mmap.c
+++ head/sys/vm/vm_mmap.c
@@ -187,6 +187,7 @@
{
struct vmspace *vms;
struct file *fp;
+ struct proc *p;
vm_offset_t addr;
vm_size_t pageoff, size;
vm_prot_t cap_maxprot;
@@ -199,6 +200,9 @@
prot = PROT_EXTRACT(prot);
if (max_prot != 0 && (max_prot & prot) != prot)
return (EINVAL);
+
+ p = td->td_proc;
+
/*
* Always honor PROT_MAX if set. If not, default to all
* permissions unless we're implying maximum permissions.
@@ -209,7 +213,7 @@
max_prot = (imply_prot_max && prot != PROT_NONE) ?
prot : _PROT_ALL;
- vms = td->td_proc->p_vmspace;
+ vms = p->p_vmspace;
fp = NULL;
AUDIT_ARG_FD(fd);
addr = addr0;
@@ -229,7 +233,7 @@
* pos.
*/
if (!SV_CURPROC_FLAG(SV_AOUT)) {
- if ((len == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) ||
+ if ((len == 0 && p->p_osrel >= P_OSREL_MAP_ANON) ||
((flags & MAP_ANON) != 0 && (fd != -1 || pos != 0)))
return (EINVAL);
} else {
@@ -375,7 +379,7 @@
if (error != 0)
goto done;
if ((flags & (MAP_SHARED | MAP_PRIVATE)) == 0 &&
- td->td_proc->p_osrel >= P_OSREL_MAP_FSTRICT) {
+ p->p_osrel >= P_OSREL_MAP_FSTRICT) {
error = EINVAL;
goto done;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 21, 5:15 AM (1 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12349888
Default Alt Text
D20795.id.diff (1 KB)

Event Timeline