Date: Tue, 22 Oct 2019 18:05:15 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353896 - head/sys/kern Message-ID: <201910221805.x9MI5FQr024097@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910221805.x9MI5FQr024097>