mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-02 21:32:58 +00:00
Fix two bugs introduced with the rstack functionality and specific to
the rstack functionality: 1. Fix a KASSERT that tests for the address to be above the upward growable stack. Typically for rstack, the faulting address can be identical to the record end of the upward growable entry, and very likely is on ia64. The KASSERT tested for greater than, not greater equal, so whenever the register stack had to be grown the assertion fired. 2. When we grow the upward growable stack entry and adjust the unlying object, don't forget to adjust the size of the VM map. Not doing so would trigger an assert in vm_mapzdtor(). Pointy hat: marcel (for not testing with INVARIANTS).
This commit is contained in:
parent
9f206707a5
commit
08667f6dc1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121786
@ -2681,7 +2681,7 @@ Retry:
|
||||
max_grow = stack_entry->start - end;
|
||||
} else {
|
||||
KASSERT(stack_entry->eflags & MAP_ENTRY_GROWS_UP, ("foo"));
|
||||
KASSERT(addr > stack_entry->end, ("foo"));
|
||||
KASSERT(addr >= stack_entry->end, ("foo"));
|
||||
end = (next_entry != &map->header) ? next_entry->start :
|
||||
stack_entry->end + stack_entry->avail_ssize;
|
||||
grow_amount = roundup(addr + 1 - stack_entry->end, PAGE_SIZE);
|
||||
@ -2800,6 +2800,7 @@ Retry:
|
||||
OFF_TO_IDX(stack_entry->offset),
|
||||
(vm_size_t)(stack_entry->end - stack_entry->start),
|
||||
(vm_size_t)grow_amount)) {
|
||||
map->size += (addr - stack_entry->end);
|
||||
/* Update the current entry. */
|
||||
stack_entry->end = addr;
|
||||
rv = KERN_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user