linux-stable/kernel/trace
Christoph Hellwig 2c1eebbef7 block: serialize all debugfs operations using q->debugfs_mutex
[ Upstream commit 5cf9c91ba9 ]

Various places like I/O schedulers or the QOS infrastructure try to
register debugfs files on demans, which can race with creating and
removing the main queue debugfs directory.  Use the existing
debugfs_mutex to serialize all debugfs operations that rely on
q->debugfs_dir or the directories hanging off it.

To make the teardown code a little simpler declare all debugfs dentry
pointers and not just the main one uncoditionally in blkdev.h.

Move debugfs_mutex next to the dentries that it protects and document
what it is used for.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220614074827.458955-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:42:24 +02:00
..
Kconfig
Makefile
blktrace.c
bpf_trace.c
bpf_trace.h
error_report-traces.c
fgraph.c
fprobe.c
ftrace.c
ftrace_internal.h
kprobe_event_gen_test.c
pid_list.c
pid_list.h
power-traces.c
preemptirq_delay_test.c
rethook.c
ring_buffer.c
ring_buffer_benchmark.c
rpm-traces.c
synth_event_gen_test.c
trace.c
trace.h
trace_benchmark.c
trace_benchmark.h
trace_boot.c
trace_branch.c
trace_clock.c
trace_dynevent.c
trace_dynevent.h
trace_entries.h
trace_eprobe.c
trace_event_perf.c
trace_events.c
trace_events_filter.c
trace_events_filter_test.h
trace_events_hist.c
trace_events_inject.c
trace_events_synth.c
trace_events_trigger.c
trace_events_user.c
trace_export.c
trace_functions.c
trace_functions_graph.c
trace_hwlat.c
trace_irqsoff.c
trace_kdb.c
trace_kprobe.c
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_mmiotrace.c
trace_nop.c
trace_osnoise.c
trace_output.c
trace_output.h
trace_preemptirq.c
trace_printk.c
trace_probe.c
trace_probe.h
trace_probe_tmpl.h
trace_recursion_record.c
trace_sched_switch.c
trace_sched_wakeup.c
trace_selftest.c
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_synth.h
trace_syscalls.c
trace_uprobe.c
tracing_map.c
tracing_map.h