提交 48043bcd 编写于 作者: L Lai Jiangshan 提交者: Ingo Molnar

markers: fix unchecked format

when the second, third... probe is registered, its format is
not checked, this patch fixes it.
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 53c8c8fd
......@@ -653,11 +653,17 @@ int marker_probe_register(const char *name, const char *format,
entry = get_marker(name);
if (!entry) {
entry = add_marker(name, format);
if (IS_ERR(entry)) {
if (IS_ERR(entry))
ret = PTR_ERR(entry);
goto end;
}
} else if (format) {
if (!entry->format)
ret = marker_set_format(&entry, format);
else if (strcmp(entry->format, format))
ret = -EPERM;
}
if (ret)
goto end;
/*
* If we detect that a call_rcu is pending for this marker,
* make sure it's executed now.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册