diff options
author | attilio <attilio@FreeBSD.org> | 2012-10-30 15:10:50 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-10-30 15:10:50 +0000 |
commit | 279b97daea47b784fa8af7f9e6174384c141cdff (patch) | |
tree | e789d39c82bfc0a96712580c4b803232b496457d /sys/dev/hwpmc | |
parent | a93bdbb610d296583acb7082db92d7aa5891d0ff (diff) | |
download | FreeBSD-src-279b97daea47b784fa8af7f9e6174384c141cdff.zip FreeBSD-src-279b97daea47b784fa8af7f9e6174384c141cdff.tar.gz |
Fixup r240246: hwpmc needs to retain the pinning until ASTs are not
executed. This means past the point where userret() is generally
executed.
Skip the td_pinned check if a callchain tracing is currently happening
and add a more robust check to pmc_capture_user_callchain() in order to
catch td_pinned leak past ast() in hwpmc case.
Reported and tested by: fabient
MFC after: 1 week
X-MFC: r240246
Diffstat (limited to 'sys/dev/hwpmc')
-rw-r--r-- | sys/dev/hwpmc/hwpmc_mod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index 54a2a29..9e82a34 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -4248,7 +4248,7 @@ pmc_capture_user_callchain(int cpu, int ring, struct trapframe *tf) ("[pmc,%d] cpu %d didn't find a sample to collect", __LINE__, cpu)); - KASSERT(td->td_pinned > 0, + KASSERT(td->td_pinned == 1, ("[pmc,%d] invalid td_pinned value", __LINE__)); sched_unpin(); /* Can migrate safely now. */ |