lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220325122559.14251-1-mhocko@kernel.org>
Date:   Fri, 25 Mar 2022 13:25:59 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Christoph Hellwig <hch@....de>, Baoquan He <bhe@...hat.com>
Cc:     John Donnelly <john.p.donnelly@...cle.com>,
        David Hildenbrand <david@...hat.com>, <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Michal Hocko <mhocko@...e.com>
Subject: [PATCH] dma/pool: do not complain if DMA pool is not allocated

From: Michal Hocko <mhocko@...e.com>

we have a system complainging about order-5 allocation for the DMA pool.
This is something that a674e48c5443 ("dma/pool: create dma atomic pool
only if dma zone has managed pages") has already tried to achieve but I
do not think it went all the way to have it covered completely. In this
particular case has_managed_dma() will not work because:
[    0.678539][    T0] Initmem setup node 0 [mem 0x0000000000001000-0x000000027dffffff]
[    0.686316][    T0] On node 0, zone DMA: 1 pages in unavailable ranges
[    0.687093][    T0] On node 0, zone DMA32: 36704 pages in unavailable ranges
[    0.694278][    T0] On node 0, zone Normal: 53252 pages in unavailable ranges
[    0.701257][    T0] On node 0, zone Normal: 8192 pages in unavailable ranges

The allocation failure on the DMA zone shouldn't be really critical for
the system operation so just silence the warning instead.

Signed-off-by: Michal Hocko <mhocko@...e.com>
---
 kernel/dma/pool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c
index 4d40dcce7604..1bf6de398986 100644
--- a/kernel/dma/pool.c
+++ b/kernel/dma/pool.c
@@ -205,7 +205,7 @@ static int __init dma_atomic_pool_init(void)
 		ret = -ENOMEM;
 	if (has_managed_dma()) {
 		atomic_pool_dma = __dma_atomic_pool_init(atomic_pool_size,
-						GFP_KERNEL | GFP_DMA);
+						GFP_KERNEL | GFP_DMA | __GFP_NOWARN);
 		if (!atomic_pool_dma)
 			ret = -ENOMEM;
 	}
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ