[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260112104749.4132641-1-s-adivi@ti.com>
Date: Mon, 12 Jan 2026 16:17:49 +0530
From: Sai Sree Kartheek Adivi <s-adivi@...com>
To: <m.szyprowski@...sung.com>, <robin.murphy@....com>,
<iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
CC: <vigneshr@...com>
Subject: [PATCH v2] dma/pool: respect __GFP_NOWARN in dma_alloc_from_pool()
Currently, dma_alloc_from_pool() unconditionally warns and dumps a stack
trace when an allocation fails.
This prevents callers from using the __GFP_NOWARN flag to suppress error
messages, breaking the expectation that this flag will silence
allocation failure logs.
Align dma_pool behaviour with other core allocators by checking for
__GFP_NOWARN before issuing the warning.
Fixes: 9420139f516d ("dma-pool: fix coherent pool allocations for IOMMU mappings")
Signed-off-by: Sai Sree Kartheek Adivi <s-adivi@...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 26392badc36b..f63e027b8a27 100644
--- a/kernel/dma/pool.c
+++ b/kernel/dma/pool.c
@@ -276,7 +276,7 @@ struct page *dma_alloc_from_pool(struct device *dev, size_t size,
return page;
}
- WARN(1, "Failed to get suitable pool for %s\n", dev_name(dev));
+ WARN(!(gfp & __GFP_NOWARN), "Failed to get suitable pool for %s\n", dev_name(dev));
return NULL;
}
--
2.34.1
Powered by blists - more mailing lists