summaryrefslogtreecommitdiff
path: root/include/linux/kprobes.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-08-29 16:03:56 +0300
committerIngo Molnar <mingo@kernel.org>2020-10-12 19:27:28 +0300
commit6e426e0fcd20ce144bb93e00b70df51e9f2e08c3 (patch)
treef4e6ad94a04db211bfacc7cc6a931a96ecd897fd /include/linux/kprobes.h
parente563604a5f5a891283b6a8db4001cee833a7c6b8 (diff)
downloadlinux-6e426e0fcd20ce144bb93e00b70df51e9f2e08c3.tar.xz
kprobes: Replace rp->free_instance with freelist
Gets rid of rp->lock, and as a result kretprobes are now fully lockless. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/159870623583.1229682.17472357584134058687.stgit@devnote2
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r--include/linux/kprobes.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 00cf4421efd5..b7824e3f1ef5 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -28,6 +28,7 @@
#include <linux/mutex.h>
#include <linux/ftrace.h>
#include <linux/refcount.h>
+#include <linux/freelist.h>
#include <asm/kprobes.h>
#ifdef CONFIG_KPROBES
@@ -157,17 +158,16 @@ struct kretprobe {
int maxactive;
int nmissed;
size_t data_size;
- struct hlist_head free_instances;
+ struct freelist_head freelist;
struct kretprobe_holder *rph;
- raw_spinlock_t lock;
};
struct kretprobe_instance {
union {
- struct llist_node llist;
- struct hlist_node hlist;
+ struct freelist_node freelist;
struct rcu_head rcu;
};
+ struct llist_node llist;
struct kretprobe_holder *rph;
kprobe_opcode_t *ret_addr;
void *fp;