From ff265fa1ed86b85e021ec0f16a28ab48c237414a Mon Sep 17 00:00:00 2001
From: "Yichun Zhang (agentzh)" <yichun@openresty.com>
Date: Sat, 6 May 2023 15:21:14 -0700
Subject: [PATCH] PR30405: stapkp_init(): we should not disable preemption
 around the kallsyms_on_each_symbol() call

---
 runtime/linux/kprobes.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/runtime/linux/kprobes.c b/runtime/linux/kprobes.c
index 09f0e0665..1875092c5 100644
--- a/runtime/linux/kprobes.c
+++ b/runtime/linux/kprobes.c
@@ -763,9 +763,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
@@ -835,9 +833,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
-- 
2.39.1

