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-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:

- Check for NULL in kretprobe_dispatcher()

NULL can now be passed in, make sure it can handle it

- Clean up unneeded #endif #ifdef of the same preprocessor
check in the middle of the block.

- Comment clean up

- Remove unneeded initialization of the "ret" variable in
__trace_uprobe_create()

* tag 'trace-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing/uprobes: Remove unwanted initialization in __trace_uprobe_create()
tracefs: Fix syntax errors in comments
tracing: Simplify conditional compilation code in tracing_set_tracer()
tracing/kprobes: Check whether get_kretprobe() returns NULL in kretprobe_dispatcher()

+11 -5
+1 -1
fs/tracefs/inode.c
··· 553 553 * 554 554 * Only one instances directory is allowed. 555 555 * 556 - * The instances directory is special as it allows for mkdir and rmdir to 556 + * The instances directory is special as it allows for mkdir and rmdir 557 557 * to be done by userspace. When a mkdir or rmdir is performed, the inode 558 558 * locks are released and the methods passed in (@mkdir and @rmdir) are 559 559 * called without locks and with the name of the directory being created
-2
kernel/trace/trace.c
··· 6424 6424 synchronize_rcu(); 6425 6425 free_snapshot(tr); 6426 6426 } 6427 - #endif 6428 6427 6429 - #ifdef CONFIG_TRACER_MAX_TRACE 6430 6428 if (t->use_max_tr && !had_max_tr) { 6431 6429 ret = tracing_alloc_snapshot_instance(tr); 6432 6430 if (ret < 0)
+10 -1
kernel/trace/trace_kprobe.c
··· 1718 1718 kretprobe_dispatcher(struct kretprobe_instance *ri, struct pt_regs *regs) 1719 1719 { 1720 1720 struct kretprobe *rp = get_kretprobe(ri); 1721 - struct trace_kprobe *tk = container_of(rp, struct trace_kprobe, rp); 1721 + struct trace_kprobe *tk; 1722 1722 1723 + /* 1724 + * There is a small chance that get_kretprobe(ri) returns NULL when 1725 + * the kretprobe is unregister on another CPU between kretprobe's 1726 + * trampoline_handler and this function. 1727 + */ 1728 + if (unlikely(!rp)) 1729 + return 0; 1730 + 1731 + tk = container_of(rp, struct trace_kprobe, rp); 1723 1732 raw_cpu_inc(*tk->nhit); 1724 1733 1725 1734 if (trace_probe_test_flag(&tk->tp, TP_FLAG_TRACE))
-1
kernel/trace/trace_uprobe.c
··· 546 546 bool is_return = false; 547 547 int i, ret; 548 548 549 - ret = 0; 550 549 ref_ctr_offset = 0; 551 550 552 551 switch (argv[0][0]) {