-
-
Save agentzh/ba69ca1acac1b475bbf0951c7c09a245 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 99dcfeca9322f69f0ad07ff21c12a5d870b433f6 | |
Author: Yichun Zhang (agentzh) <yichun@openresty.com> | |
Date: Sat May 6 15:21:14 2023 -0700 | |
PR30405: stapkp_init(): we should not disable preemption around the kallsyms_on_each_symbol() call | |
diff --git a/runtime/linux/kprobes.c b/runtime/linux/kprobes.c | |
index c0f4f5c0f..75228cdce 100644 | |
--- a/runtime/linux/kprobes.c | |
+++ b/runtime/linux/kprobes.c | |
@@ -819,9 +819,7 @@ stapkp_init(struct stap_kprobe_probe *probes, | |
#ifdef STAPCONF_MODULE_MUTEX | |
mutex_lock(&module_mutex); | |
#endif | |
- preempt_disable(); | |
kallsyms_on_each_symbol(stapkp_symbol_callback, &sd); | |
- preempt_enable(); | |
#ifdef STAPCONF_MODULE_MUTEX | |
mutex_unlock(&module_mutex); | |
#endif | |
@@ -891,9 +889,7 @@ stapkp_refresh(const char *modname, | |
#ifdef STAPCONF_MODULE_MUTEX | |
mutex_lock(&module_mutex); | |
#endif | |
- preempt_disable(); | |
kallsyms_on_each_symbol(stapkp_symbol_callback, &sd); | |
- preempt_enable(); | |
#ifdef STAPCONF_MODULE_MUTEX | |
mutex_unlock(&module_mutex); | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment