aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2008-10-07 22:23:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 04:38:42 -0400
commit48043bcdf8f398d28e75ffed6ee85208d751f87f (patch)
tree7a4e4251ea400be7f4ff2955fe4a02cf62a208da /kernel
parent53c8c8fdfd2d2d515bdcb3d0f2a11d1f3f42ece1 (diff)
markers: fix unchecked format
when the second, third... probe is registered, its format is not checked, this patch fixes it. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/marker.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/marker.c b/kernel/marker.c
index 05a25776f71f..3b75d0e8b5a4 100644
--- a/kernel/marker.c
+++ b/kernel/marker.c
@@ -653,11 +653,17 @@ int marker_probe_register(const char *name, const char *format,
653 entry = get_marker(name); 653 entry = get_marker(name);
654 if (!entry) { 654 if (!entry) {
655 entry = add_marker(name, format); 655 entry = add_marker(name, format);
656 if (IS_ERR(entry)) { 656 if (IS_ERR(entry))
657 ret = PTR_ERR(entry); 657 ret = PTR_ERR(entry);
658 goto end; 658 } else if (format) {
659 } 659 if (!entry->format)
660 ret = marker_set_format(&entry, format);
661 else if (strcmp(entry->format, format))
662 ret = -EPERM;
660 } 663 }
664 if (ret)
665 goto end;
666
661 /* 667 /*
662 * If we detect that a call_rcu is pending for this marker, 668 * If we detect that a call_rcu is pending for this marker,
663 * make sure it's executed now. 669 * make sure it's executed now.