Skip to content

Instantly share code, notes, and snippets.

@agentzh
Last active June 14, 2020 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agentzh/9add586e3f5691746c617291d3697d3f to your computer and use it in GitHub Desktop.
Save agentzh/9add586e3f5691746c617291d3697d3f to your computer and use it in GitHub Desktop.
diff --git a/NEWS b/NEWS
index 49baa065e..d866cc250 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
* What's new in version 4.3, 2020-06-11
+- use of the vma tracker leaks kernel slab memory for modern kernels without
+ the old Red Hat utrace patch. this had been a long standing bug.
+
- tapset functions for reading CPU registers and primitives involved with the
process memory maps work in 'probe process.begin'.
diff --git a/runtime/vma.c b/runtime/vma.c
index a14851b22..432690bb0 100644
--- a/runtime/vma.c
+++ b/runtime/vma.c
@@ -290,7 +290,9 @@ static int _stp_vma_init(void)
/* Get rid of the vma tracker (memory). */
static void _stp_vma_done(void)
{
-#if defined(CONFIG_UTRACE)
+/* NB HAVE_TASK_FINDER already includes the case of CONFIG_UTRACE.
+ * see runtime/linux/runtime.h for more details */
+#ifdef HAVE_TASK_FINDER
stap_destroy_vma_map();
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment