Page MenuHomeFreeBSD

D56863.1795460618.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D56863.1795460618.diff

diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -4731,6 +4731,7 @@
vm_map_growstack(vm_map_t map, vm_offset_t addr, vm_map_entry_t gap_entry)
{
vm_map_entry_t stack_entry;
+ struct thread *td;
struct proc *p;
struct vmspace *vm;
vm_offset_t gap_end, gap_start, grow_start;
@@ -4746,7 +4747,8 @@
int error __diagused;
#endif
- p = curproc;
+ td = curthread;
+ p = td->td_proc;
vm = p->p_vmspace;
/*
@@ -4760,9 +4762,9 @@
MPASS(!vm_map_is_system(map));
- lmemlim = lim_cur(curthread, RLIMIT_MEMLOCK);
- stacklim = lim_cur(curthread, RLIMIT_STACK);
- vmemlim = lim_cur(curthread, RLIMIT_VMEM);
+ lmemlim = lim_cur(td, RLIMIT_MEMLOCK);
+ stacklim = lim_cur(td, RLIMIT_STACK);
+ vmemlim = lim_cur(td, RLIMIT_VMEM);
retry:
/* If addr is not in a hole for a stack grow area, no need to grow. */
if (gap_entry == NULL && !vm_map_lookup_entry(map, addr, &gap_entry))
@@ -4778,8 +4780,8 @@
} else {
return (KERN_FAILURE);
}
- guard = ((curproc->p_flag2 & P2_STKGAP_DISABLE) != 0 ||
- (curproc->p_fctl0 & NT_FREEBSD_FCTL_STKGAP_DISABLE) != 0) ? 0 :
+ guard = ((p->p_flag2 & P2_STKGAP_DISABLE) != 0 ||
+ (p->p_fctl0 & NT_FREEBSD_FCTL_STKGAP_DISABLE) != 0) ? 0 :
gap_entry->next_read;
max_grow = gap_entry->end - gap_entry->start;
if (guard > max_grow)

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 23, 7:03 PM (23 h, 28 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41938205
Default Alt Text
D56863.1795460618.diff (1 KB)

Event Timeline