]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
uprobes: Kill uprobe_consumer->filter()
authorOleg Nesterov <oleg@redhat.com>
Wed, 21 Nov 2012 16:32:30 +0000 (17:32 +0100)
committerOleg Nesterov <oleg@redhat.com>
Fri, 8 Feb 2013 16:47:02 +0000 (17:47 +0100)
uprobe_consumer->filter() is pointless in its current form, kill it.

We will add it back, but with the different signature/semantics. Perhaps
we will even re-introduce the callsite in handler_chain(), but not to
just skip uc->handler().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
include/linux/uprobes.h
kernel/events/uprobes.c
kernel/trace/trace_uprobe.c

index 4f628a6fc5b415cb763e9fd3b9260526649a7436..83742b91ff73f973ae2e8f9cd25b44dc85f06144 100644 (file)
@@ -37,11 +37,6 @@ struct inode;
 
 struct uprobe_consumer {
        int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs);
-       /*
-        * filter is optional; If a filter exists, handler is run
-        * if and only if filter returns true.
-        */
-       bool (*filter)(struct uprobe_consumer *self, struct task_struct *task);
 
        struct uprobe_consumer *next;
 };
index a39d8163b713557f73fb9358205f9ec6e5c73a6e..5cbebac27c01570463ec7d7682ee12ca2ccccd20 100644 (file)
@@ -477,10 +477,8 @@ static void handler_chain(struct uprobe *uprobe, struct pt_regs *regs)
                return;
 
        down_read(&uprobe->consumer_rwsem);
-       for (uc = uprobe->consumers; uc; uc = uc->next) {
-               if (!uc->filter || uc->filter(uc, current))
-                       uc->handler(uc, regs);
-       }
+       for (uc = uprobe->consumers; uc; uc = uc->next)
+               uc->handler(uc, regs);
        up_read(&uprobe->consumer_rwsem);
 }
 
index 87b6db4ccbc5afbd7323a282dbb82de6803c8671..e668024773d47722df60b840c481f75f4e910635 100644 (file)
@@ -550,7 +550,6 @@ static int probe_event_enable(struct trace_uprobe *tu, int flag)
                return -EINTR;
 
        utc->cons.handler = uprobe_dispatcher;
-       utc->cons.filter = NULL;
        ret = uprobe_register(tu->inode, tu->offset, &utc->cons);
        if (ret) {
                kfree(utc);