]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Do not run pmclog_configure_log() without pmc_sx protection.
authorKonstantin Belousov <kib@FreeBSD.org>
Wed, 1 Nov 2017 11:43:39 +0000 (11:43 +0000)
committerKonstantin Belousov <kib@FreeBSD.org>
Wed, 1 Nov 2017 11:43:39 +0000 (11:43 +0000)
commit20b555e1462d40b84210293808d270fdcacc9eb6
tree8e1041b7e534bfd2ca08d7699c018b3fc8172d85
parent1121a37474fd5e864b744fd220a1bcb78ed66fae
Do not run pmclog_configure_log() without pmc_sx protection.

The r195005 unlocked pmc_sx before calling into pmclog_configure_log()
to avoid the LOR, but it allows flush or closelog to run in parallel
with the configuration, causing many failure modes.

Revert r195005.  Pre-create the logging process, allowing it to run
after the set up succeeded, otherwise the process terminates itself.

Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D12882
sys/dev/hwpmc/hwpmc_logging.c
sys/dev/hwpmc/hwpmc_mod.c
sys/sys/pmclog.h