]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dma-debug: fix debugfs initialization order
authorAnthony Iliopoulos <ailiop@suse.com>
Thu, 22 Jul 2021 14:10:55 +0000 (16:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:13 +0000 (13:40 +0200)
commitfa55e76641d80b36994904c7dff7ec9b3d91b8a3
tree7471c5503071bd74b2e3c55c662ea5e5040bea6c
parentca7f7e37bae4e3aa1d01536c5907131796b49136
dma-debug: fix debugfs initialization order

[ Upstream commit 173735c346c412d9f084825ecb04f24ada0e2986 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/dma/debug.c