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

Pull tracing fixes from Steven Rostedt:
"Two locking fixes:

- Add mutex protection to ring_buffer_reset()

- Fix deadlock in modify_ftrace_direct_multi()"

* tag 'trace-v5.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
ftrace/direct: Fix lockup in modify_ftrace_direct_multi
ring-buffer: Protect ring_buffer_reset() from reentrancy

+7 -1
+2 -1
kernel/trace/ftrace.c
··· 5602 5602 } 5603 5603 } 5604 5604 5605 + mutex_unlock(&ftrace_lock); 5606 + 5605 5607 /* Removing the tmp_ops will add the updated direct callers to the functions */ 5606 5608 unregister_ftrace_function(&tmp_ops); 5607 5609 5608 - mutex_unlock(&ftrace_lock); 5609 5610 out_direct: 5610 5611 mutex_unlock(&direct_mutex); 5611 5612 return err;
+5
kernel/trace/ring_buffer.c
··· 5228 5228 struct ring_buffer_per_cpu *cpu_buffer; 5229 5229 int cpu; 5230 5230 5231 + /* prevent another thread from changing buffer sizes */ 5232 + mutex_lock(&buffer->mutex); 5233 + 5231 5234 for_each_buffer_cpu(buffer, cpu) { 5232 5235 cpu_buffer = buffer->buffers[cpu]; 5233 5236 ··· 5249 5246 atomic_dec(&cpu_buffer->record_disabled); 5250 5247 atomic_dec(&cpu_buffer->resize_disabled); 5251 5248 } 5249 + 5250 + mutex_unlock(&buffer->mutex); 5252 5251 } 5253 5252 EXPORT_SYMBOL_GPL(ring_buffer_reset); 5254 5253