]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 10 May 2022 17:17:32 +0000 (13:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 14:59:16 +0000 (16:59 +0200)
commita4d4e55e34079bc72fbf2f63e9babcf67f8fe195
tree8a023128a74d6b526c110cf83c19d3343eef6ff0
parent0f0629ecfac4256c615a495b8bf0bee13ffaeeba
dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC

[ Upstream commit 84bc4f1dbbbb5f8aa68706a96711dccb28b518e5 ]

We observed the error "cacheline tracking ENOMEM, dma-debug disabled"
during a light system load (copying some files). The reason for this error
is that the dma_active_cacheline radix tree uses GFP_NOWAIT allocation -
so it can't access the emergency memory reserves and it fails as soon as
anybody reaches the watermark.

This patch changes GFP_NOWAIT to GFP_ATOMIC, so that it can access the
emergency memory reserves.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/dma/debug.c