Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48043bcd authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Ingo Molnar
Browse files

markers: fix unchecked format



when the second, third... probe is registered, its format is
not checked, this patch fixes it.

Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 53c8c8fd
Loading
Loading
Loading
Loading
+9 −3
Original line number Original line Diff line number Diff line
@@ -653,11 +653,17 @@ int marker_probe_register(const char *name, const char *format,
	entry = get_marker(name);
	entry = get_marker(name);
	if (!entry) {
	if (!entry) {
		entry = add_marker(name, format);
		entry = add_marker(name, format);
		if (IS_ERR(entry)) {
		if (IS_ERR(entry))
			ret = PTR_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,
	 * If we detect that a call_rcu is pending for this marker,
	 * make sure it's executed now.
	 * make sure it's executed now.