Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'trace-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull last-minute tracing fixes from Steven Rostedt:
"Two fixes:

One is for a crash when using the :mod: trace probe command into
stack_trace_filter. This bug was introduced during the last merge
window.

The other was there forever. It's a small bug that makes it impossible
to name a module function for kprobes when the module starts with a
digit"

* tag 'trace-v4.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing/kprobes: Allow to create probe with a module name starting with a digit
ftrace: Fix regression with module command in stack_trace_filter

+24 -14
-3
kernel/trace/ftrace.c
··· 4337 4337 4338 4338 command = strsep(&next, ":"); 4339 4339 4340 - if (WARN_ON_ONCE(!tr)) 4341 - return -EINVAL; 4342 - 4343 4340 mutex_lock(&ftrace_cmd_mutex); 4344 4341 list_for_each_entry(p, &ftrace_commands, list) { 4345 4342 if (strcmp(p->name, command) == 0) {
+3
kernel/trace/trace.c
··· 6881 6881 char *number; 6882 6882 int ret; 6883 6883 6884 + if (!tr) 6885 + return -ENODEV; 6886 + 6884 6887 /* hash funcs only work with set_ftrace_filter */ 6885 6888 if (!enable) 6886 6889 return -EINVAL;
+12
kernel/trace/trace_functions.c
··· 654 654 { 655 655 struct ftrace_probe_ops *ops; 656 656 657 + if (!tr) 658 + return -ENODEV; 659 + 657 660 /* we register both traceon and traceoff to this callback */ 658 661 if (strcmp(cmd, "traceon") == 0) 659 662 ops = param ? &traceon_count_probe_ops : &traceon_probe_ops; ··· 673 670 { 674 671 struct ftrace_probe_ops *ops; 675 672 673 + if (!tr) 674 + return -ENODEV; 675 + 676 676 ops = param ? &stacktrace_count_probe_ops : &stacktrace_probe_ops; 677 677 678 678 return ftrace_trace_probe_callback(tr, ops, hash, glob, cmd, ··· 687 681 char *glob, char *cmd, char *param, int enable) 688 682 { 689 683 struct ftrace_probe_ops *ops; 684 + 685 + if (!tr) 686 + return -ENODEV; 690 687 691 688 ops = &dump_probe_ops; 692 689 ··· 703 694 char *glob, char *cmd, char *param, int enable) 704 695 { 705 696 struct ftrace_probe_ops *ops; 697 + 698 + if (!tr) 699 + return -ENODEV; 706 700 707 701 ops = &cpudump_probe_ops; 708 702
+5 -9
kernel/trace/trace_kprobe.c
··· 707 707 pr_info("Probe point is not specified.\n"); 708 708 return -EINVAL; 709 709 } 710 - if (isdigit(argv[1][0])) { 711 - /* an address specified */ 712 - ret = kstrtoul(&argv[1][0], 0, (unsigned long *)&addr); 713 - if (ret) { 714 - pr_info("Failed to parse address.\n"); 715 - return ret; 716 - } 717 - } else { 710 + 711 + /* try to parse an address. if that fails, try to read the 712 + * input as a symbol. */ 713 + if (kstrtoul(argv[1], 0, (unsigned long *)&addr)) { 718 714 /* a symbol specified */ 719 715 symbol = argv[1]; 720 716 /* TODO: support .init module functions */ 721 717 ret = traceprobe_split_symbol_offset(symbol, &offset); 722 718 if (ret) { 723 - pr_info("Failed to parse symbol.\n"); 719 + pr_info("Failed to parse either an address or a symbol.\n"); 724 720 return ret; 725 721 } 726 722 if (offset && is_return &&
+4 -2
kernel/trace/trace_stack.c
··· 409 409 static int 410 410 stack_trace_filter_open(struct inode *inode, struct file *file) 411 411 { 412 - return ftrace_regex_open(&trace_ops, FTRACE_ITER_FILTER, 412 + struct ftrace_ops *ops = inode->i_private; 413 + 414 + return ftrace_regex_open(ops, FTRACE_ITER_FILTER, 413 415 inode, file); 414 416 } 415 417 ··· 478 476 NULL, &stack_trace_fops); 479 477 480 478 trace_create_file("stack_trace_filter", 0444, d_tracer, 481 - NULL, &stack_trace_filter_fops); 479 + &trace_ops, &stack_trace_filter_fops); 482 480 483 481 if (stack_trace_filter_buf[0]) 484 482 ftrace_set_early_filter(&trace_ops, stack_trace_filter_buf, 1);