]> rtime.felk.cvut.cz Git - linux-imx.git/blobdiff - kernel/trace/trace_uprobe.c
tracing/perf: Move the PERF_MAX_TRACE_SIZE check into perf_trace_buf_prepare()
[linux-imx.git] / kernel / trace / trace_uprobe.c
index 32494fb0ee640eef4548ac380cd158eab7415083..a23d2d71188e61f6ad3b706730b2a70d8c773103 100644 (file)
@@ -283,8 +283,10 @@ static int create_trace_uprobe(int argc, char **argv)
                return -EINVAL;
        }
        arg = strchr(argv[1], ':');
-       if (!arg)
+       if (!arg) {
+               ret = -EINVAL;
                goto fail_address_parse;
+       }
 
        *arg++ = '\0';
        filename = argv[1];
@@ -816,8 +818,6 @@ static void uprobe_perf_print(struct trace_uprobe *tu,
 
        size = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));
        size = ALIGN(size + tu->size + sizeof(u32), sizeof(u64)) - sizeof(u32);
-       if (WARN_ONCE(size > PERF_MAX_TRACE_SIZE, "profile buffer not large enough"))
-               return;
 
        preempt_disable();
        head = this_cpu_ptr(call->perf_events);