Skip to content

Commit 544521d

Browse files
committed
Merge tag 'probes-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull probes updates from Masami Hiramatsu: - kprobes: Cleanups using guard() and __free(): Use cleanup.h macros to cleanup code and remove all gotos from kprobes code. - tracing/probes: Also cleanups tracing/*probe events code with guard() and __free(). These patches are just to simplify the parser codes. - kprobes: Reduce preempt disable scope in check_kprobe_access_safe() This reduces preempt disable time to only when getting the module refcount in check_kprobe_access_safe(). Previously it disabled preempt needlessly for other checks including jump_label_text_reserved(), which took a long time because of the linear search. * tag 'probes-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/kprobes: Simplify __trace_kprobe_create() by removing gotos tracing: Use __free() for kprobe events to cleanup tracing: Use __free() in trace_probe for cleanup kprobes: Remove remaining gotos kprobes: Remove unneeded goto kprobes: Use guard for rcu_read_lock kprobes: Use guard() for external locks jump_label: Define guard() for jump_label_lock tracing/eprobe: Adopt guard() and scoped_guard() tracing/uprobe: Adopt guard() and scoped_guard() tracing/kprobe: Adopt guard() and scoped_guard() kprobes: Adopt guard() and scoped_guard() kprobes: Reduce preempt disable scope in check_kprobe_access_safe()
2 parents e0b1f59 + 9270546 commit 544521d

File tree

6 files changed

+384
-468
lines changed

6 files changed

+384
-468
lines changed

include/linux/jump_label.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575

7676
#include <linux/types.h>
7777
#include <linux/compiler.h>
78+
#include <linux/cleanup.h>
7879

7980
extern bool static_key_initialized;
8081

@@ -347,6 +348,8 @@ static inline void static_key_disable(struct static_key *key)
347348

348349
#endif /* CONFIG_JUMP_LABEL */
349350

351+
DEFINE_LOCK_GUARD_0(jump_label_lock, jump_label_lock(), jump_label_unlock())
352+
350353
#define STATIC_KEY_INIT STATIC_KEY_INIT_FALSE
351354
#define jump_label_enabled static_key_enabled
352355

0 commit comments

Comments
 (0)