]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
hwpmc: fix load/unload race and vm map LOR
authorMatt Macy <mmacy@FreeBSD.org>
Mon, 14 May 2018 00:21:04 +0000 (00:21 +0000)
committerMatt Macy <mmacy@FreeBSD.org>
Mon, 14 May 2018 00:21:04 +0000 (00:21 +0000)
commit0f00315cb37468757755d73b2ca49dd2e386f1b1
treee5db00c3a221bce7559b3055c965b85da2e48aad
parent0c58f85b8de4a7aebf91cf0fe48c9f911a06316a
hwpmc: fix load/unload race and vm map LOR

- fix load/unload race by allocating the per-domain list structure at boot

- fix long extant vm map LOR by replacing pmc_sx sx_slock with global_epoch
  to protect the liveness of elements of the pmc_ss_owners list

Reported by: pho
Approved by: sbruno
sys/dev/hwpmc/hwpmc_logging.c
sys/dev/hwpmc/hwpmc_mod.c
sys/kern/kern_pmc.c
sys/sys/pmc.h
sys/sys/pmckern.h