mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Accessing the epoch structure should happen after the INIT_CHECK().
Else the epoch pointer may be NULL.
Sponsored by: Mellanox Technologies // NVIDIA Networking
(cherry picked from commit c82c200622)
This commit is contained in:
parent
8d8bfdf20d
commit
623d96f4af
1 changed files with 2 additions and 1 deletions
|
|
@ -442,13 +442,14 @@ _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE)
|
|||
struct thread *td;
|
||||
|
||||
MPASS(cold || epoch != NULL);
|
||||
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);
|
||||
MPASS(epoch->e_flags & EPOCH_PREEMPT);
|
||||
|
||||
#ifdef EPOCH_TRACE
|
||||
epoch_trace_enter(td, epoch, et, file, line);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue