]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - kernel/trace/trace_functions_graph.c
Merge branch 'tip/perf/urgent-3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[~shefty/rdma-dev.git] / kernel / trace / trace_functions_graph.c
index b4c179ae4e45019e4f73c10ac21cd26fa4219192..6f233698518ede15cc9302e889de9f108aa0f1cb 100644 (file)
@@ -649,7 +649,8 @@ trace_print_graph_duration(unsigned long long duration, struct trace_seq *s)
 
        /* Print nsecs (we don't want to exceed 7 numbers) */
        if (len < 7) {
-               snprintf(nsecs_str, 8 - len, "%03lu", nsecs_rem);
+               snprintf(nsecs_str, min(sizeof(nsecs_str), 8UL - len), "%03lu",
+                        nsecs_rem);
                ret = trace_seq_printf(s, ".%s", nsecs_str);
                if (!ret)
                        return TRACE_TYPE_PARTIAL_LINE;