summaryrefslogtreecommitdiffstats
path: root/fs/dlm/ast.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-01-27 18:36:24 +0100
committerOleg Nesterov <oleg@redhat.com>2013-02-08 18:10:19 +0100
commit4161824f18ff4f56f46595a4016c7315dd0d24f1 (patch)
tree0543311b70f8855f967fb41c3d7c3bf61c0c8a09 /fs/dlm/ast.c
parent84d7ed799fd6c1366547d88ddb8188c65de3b94f (diff)
downloadop-kernel-dev-4161824f18ff4f56f46595a4016c7315dd0d24f1.zip
op-kernel-dev-4161824f18ff4f56f46595a4016c7315dd0d24f1.tar.gz
uprobes/tracing: Fully initialize uprobe_trace_consumer before uprobe_register()
probe_event_enable() does uprobe_register() and only after that sets utc->tu and tu->consumer/flags. This can race with uprobe_dispatcher() which can miss these assignments or see them out of order. Nothing really bad can happen, but this doesn't look clean/safe. And this does not allow to use uprobe_consumer->filter() we are going to add, it is called by uprobe_register() and it needs utc->tu. Change this code to initialize everything before uprobe_register(), and reset tu->consumer/flags if it fails. We can't race with event_disable(), the caller holds event_mutex, and if we could the code would be wrong anyway. In fact I think uprobe_trace_consumer should die, it buys nothing but complicates the code. We can simply add uprobe_consumer into trace_uprobe. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Diffstat (limited to 'fs/dlm/ast.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud