mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
pmc: don't add pmc owner to list until setup is complete
Once a pmc owner is added to the pmc_ss_owners list it is visible for all to see. We don't want this to happen until setup is complete. Reported by: mjg Approved by: sbruno
This commit is contained in:
parent
eae1b7dfa1
commit
8fa7df3668
1 changed files with 6 additions and 7 deletions
|
|
@ -2733,13 +2733,6 @@ pmc_start(struct pmc *pm)
|
|||
*/
|
||||
|
||||
if (mode == PMC_MODE_SS) {
|
||||
if (po->po_sscount == 0) {
|
||||
CK_LIST_INSERT_HEAD(&pmc_ss_owners, po, po_ssnext);
|
||||
atomic_add_rel_int(&pmc_ss_count, 1);
|
||||
PMCDBG1(PMC,OPS,1, "po=%p in global list", po);
|
||||
}
|
||||
po->po_sscount++;
|
||||
|
||||
/*
|
||||
* Log mapping information for all existing processes in the
|
||||
* system. Subsequent mappings are logged as they happen;
|
||||
|
|
@ -2749,6 +2742,12 @@ pmc_start(struct pmc *pm)
|
|||
pmc_log_all_process_mappings(po);
|
||||
po->po_logprocmaps = 1;
|
||||
}
|
||||
po->po_sscount++;
|
||||
if (po->po_sscount == 1) {
|
||||
atomic_add_rel_int(&pmc_ss_count, 1);
|
||||
CK_LIST_INSERT_HEAD(&pmc_ss_owners, po, po_ssnext);
|
||||
PMCDBG1(PMC,OPS,1, "po=%p in global list", po);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue