Allow epoch tracker to use the very last byte of the stack. Not sure

this will help to avoid panic in this function, since it will also use
some stack, but makes code more strict.

Submitted by:	hselasky
This commit is contained in:
glebius 2019-10-22 18:05:15 +00:00
parent 9582ed1083
commit 10ee156a04

View File

@ -369,7 +369,7 @@ _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE)
MPASS(epoch->e_flags & EPOCH_PREEMPT);
td = curthread;
MPASS((vm_offset_t)et >= td->td_kstack &&
(vm_offset_t)et + sizeof(struct epoch_tracker) <
(vm_offset_t)et + sizeof(struct epoch_tracker) <=
td->td_kstack + td->td_kstack_pages * PAGE_SIZE);
INIT_CHECK(epoch);