提交 fe20d71f 编写于 作者: O Oleg Nesterov

uprobes: Kill uprobe_consumer->filter()

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: NOleg Nesterov <oleg@redhat.com>
Acked-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
上级 f0744af7
...@@ -37,11 +37,6 @@ struct inode; ...@@ -37,11 +37,6 @@ struct inode;
struct uprobe_consumer { struct uprobe_consumer {
int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs); 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; struct uprobe_consumer *next;
}; };
......
...@@ -477,10 +477,8 @@ static void handler_chain(struct uprobe *uprobe, struct pt_regs *regs) ...@@ -477,10 +477,8 @@ static void handler_chain(struct uprobe *uprobe, struct pt_regs *regs)
return; return;
down_read(&uprobe->consumer_rwsem); down_read(&uprobe->consumer_rwsem);
for (uc = uprobe->consumers; uc; uc = uc->next) { for (uc = uprobe->consumers; uc; uc = uc->next)
if (!uc->filter || uc->filter(uc, current)) uc->handler(uc, regs);
uc->handler(uc, regs);
}
up_read(&uprobe->consumer_rwsem); up_read(&uprobe->consumer_rwsem);
} }
......
...@@ -550,7 +550,6 @@ static int probe_event_enable(struct trace_uprobe *tu, int flag) ...@@ -550,7 +550,6 @@ static int probe_event_enable(struct trace_uprobe *tu, int flag)
return -EINTR; return -EINTR;
utc->cons.handler = uprobe_dispatcher; utc->cons.handler = uprobe_dispatcher;
utc->cons.filter = NULL;
ret = uprobe_register(tu->inode, tu->offset, &utc->cons); ret = uprobe_register(tu->inode, tu->offset, &utc->cons);
if (ret) { if (ret) {
kfree(utc); kfree(utc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册