]> git.baikalelectronics.ru Git - kernel.git/commit
dma-debug: fix debugfs initialization order
authorAnthony Iliopoulos <ailiop@suse.com>
Thu, 22 Jul 2021 14:10:55 +0000 (16:10 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 9 Aug 2021 15:06:11 +0000 (17:06 +0200)
commit46856d6a5707cd68a9cfd9229f203abd4daf3ef4
treec6da8ceb0e65c6d85a3491e9d5bc4f79c2696956
parent9d42f60025a34ece37b63e226dc59b3532155a2c
dma-debug: fix debugfs initialization order

Due to link order, dma_debug_init is called before debugfs has a chance
to initialize (via debugfs_init which also happens in the core initcall
stage), so the directories for dma-debug are never created.

Decouple dma_debug_fs_init from dma_debug_init and defer its init until
core_initcall_sync (after debugfs has been initialized) while letting
dma-debug initialization occur as soon as possible to catch any early
mappings, as suggested in [1].

[1] https://lore.kernel.org/linux-iommu/YIgGa6yF%2Fadg8OSN@kroah.com/

Fixes: 76e3a973375a ("dma-debug: move initialization to common code")
Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/debug.c