Author: glebius
Date: Tue Oct 22 18:05:15 2019
New Revision: 353896
URL: https://svnweb.freebsd.org/changeset/base/353896

Log:
  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

Modified:
  head/sys/kern/subr_epoch.c

Modified: head/sys/kern/subr_epoch.c
==============================================================================
--- head/sys/kern/subr_epoch.c  Tue Oct 22 17:22:10 2019        (r353895)
+++ head/sys/kern/subr_epoch.c  Tue Oct 22 18:05:15 2019        (r353896)
@@ -369,7 +369,7 @@ _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et
        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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to