summaryrefslogtreecommitdiffstats
path: root/lib/libdevdctl/exception.cc
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2016-05-28 13:05:39 +0000
committerandrew <andrew@FreeBSD.org>2016-05-28 13:05:39 +0000
commit15f895037c82da771c558cbbda75c3ae7f309e15 (patch)
tree6ae0da9974e37e213b350595dc71c70b6aefa396 /lib/libdevdctl/exception.cc
parentfbe84e555ec89968a32109225d6f5992cca3b5a4 (diff)
downloadFreeBSD-src-15f895037c82da771c558cbbda75c3ae7f309e15.zip
FreeBSD-src-15f895037c82da771c558cbbda75c3ae7f309e15.tar.gz
Don't panic in hwpmc when stopping sampling.
When hwpmc stops sampling it will set the pm_state to something other than PMC_STATE_RUNNING. This means the following sequence can happen: CPU 0: Enter the interrupt handler CPU 0: Set the thread TDP_CALLCHAIN pflag CPU 1: Stop sampling CPU 0: Call pmc_process_samples, sampling is stopped so clears ps_nsamples CPU 0: Finishes interrupt processing with the TDP_CALLCHAIN flag set CPU 0: Call pmc_capture_user_callchain to capture the user call chain CPU 0: Find all the pmc sample are free so no call chains need to be captured CPU 0: KASSERT because of this This fixes the issue by checking if any of the samples have been stopped and including this in te KASSERT. PR: 204273 Reviewed by: bz, gnn Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D6581
Diffstat (limited to 'lib/libdevdctl/exception.cc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud