about [UPDATING] [RELNOTES] [VERSION]summaryrefslograw-logtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Peek <mp@FreeBSD.org>2026-11-28 17:21:58 +0000
committerMark Peek <mp@FreeBSD.org>2026-12-06 00:20:29 +0000
commitcc15a53f1adb74e17d8c39faa1ab5296b0a1c076 (patch) (diff)
treecccd0b4899299bbcb79de7d720b9564b10e3fc7b
downloadsrc-stable/15.tar.gz
 
previous commit234fb7a45f7b56a7dae4eee7977438e61f452c46 (amd64/sdt: Use a single NOP for disabled probes)
sdt: Don't clear a probe's ID when disabling it HEADstable/15
A thread may have jumped out of a tracepoint but not yet loaded the probe ID when sdt_disable() clears it. It then calls dtrace_probe() with ID 0, which reads far past the end of the probe array. Leave the ID set. dtrace_probe() does nothing for a disabled probe, and sdt_enable() sets the ID each time. Reviewed by: markj MFC after: 1w Co-authored-by: Claude Opus 5.5 Differential Revision: https://reviews.freebsd.org/D62154 (cherry picked from commit ef6d8eb703b959a91c28222a20b3f3a04ba4ff1a)
-rw-r--r--sys/cddl/dev/sdt/sdt.c[diff] [file]2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cddl/dev/sdt/sdt.c b/sys/cddl/dev/sdt/sdt.c
index 0a9059104671..013fb4282f27 100644
--- a/sys/cddl/dev/sdt/sdt.c
+++ b/sys/cddl/dev/sdt/sdt.c
@@ -312,7 +312,7 @@ sdt_disable(void *arg __unused, dtrace_id_t id, void *parg)
if (lockstat_enabled_count == 0)
lockstat_enabled = false;
}
- probe->id = 0;
+
probe->sdtp_lf->nenabled--;
}
This site is maintained by Jamie Landeg-Jones <jamie@catflap.org>, and is not an official FreeBSD project, nor is it endorsed by the FreeBSD team.