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)
commit173735c346c412d9f084825ecb04f24ada0e2986
treec6da8ceb0e65c6d85a3491e9d5bc4f79c2696956
parent1d7db834a027ecfb5ac93be2e8bb45bfcbbf6eaa
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: 15b28bbcd567 ("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