Skip to content

Commit

Permalink
markers: fix unchecked format
Browse files Browse the repository at this point in the history
when the second, third... probe is registered, its format is
not checked, this patch fixes it.

Signed-off-by: Lai Jiangshan <[email protected]>
Acked-by: Mathieu Desnoyers <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Oct 14, 2008
1 parent 53c8c8f commit 48043bc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions kernel/marker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 48043bc

Please sign in to comment.