svn commit: r353876 - head/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Mon Oct 21 23:12:15 UTC 2019
Author: glebius
Date: Mon Oct 21 23:12:14 2019
New Revision: 353876
URL: https://svnweb.freebsd.org/changeset/base/353876
Log:
Assert that any epoch tracker belongs to the thread stack.
Reviewed by: kib
Modified:
head/sys/kern/subr_epoch.c
Modified: head/sys/kern/subr_epoch.c
==============================================================================
--- head/sys/kern/subr_epoch.c Mon Oct 21 21:21:34 2019 (r353875)
+++ head/sys/kern/subr_epoch.c Mon Oct 21 23:12:14 2019 (r353876)
@@ -366,9 +366,13 @@ _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et
struct thread *td;
MPASS(cold || epoch != NULL);
- INIT_CHECK(epoch);
MPASS(epoch->e_flags & EPOCH_PREEMPT);
td = curthread;
+ MPASS((vm_offset_t)et >= td->td_kstack &&
+ (vm_offset_t)et + sizeof(struct epoch_tracker) <
+ td->td_kstack + td->td_kstack_pages * PAGE_SIZE);
+
+ INIT_CHECK(epoch);
#ifdef EPOCH_TRACE
epoch_trace_enter(td, epoch, et, file, line);
#endif
More information about the svn-src-all
mailing list