linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/dmapool.c: add WARN_ON() in dma_pool_destroy
@ 2020-07-31  2:39 qiang.zhang
  2020-07-31  2:38 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: qiang.zhang @ 2020-07-31  2:39 UTC (permalink / raw)
  To: willy, akpm; +Cc: linux-mm, linux-kernel

From: Zhang Qiang <qiang.zhang@windriver.com>

The pool is being destroyed, all page which in the pool,
should be free. if some page is still be use by somebody,
we should not just output error logs, also should also add
a warning message.

Signed-off-by: Zhang Qiang <qiang.zhang@windriver.com>
---
 mm/dmapool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/dmapool.c b/mm/dmapool.c
index f9fb9bbd733e..8f4dc53dde5b 100644
--- a/mm/dmapool.c
+++ b/mm/dmapool.c
@@ -285,7 +285,7 @@ void dma_pool_destroy(struct dma_pool *pool)
 		struct dma_page *page;
 		page = list_entry(pool->page_list.next,
 				  struct dma_page, page_list);
-		if (is_page_busy(page)) {
+		if (WARN_ON(is_page_busy(page))) {
 			if (pool->dev)
 				dev_err(pool->dev,
 					"dma_pool_destroy %s, %p busy\n",
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-31 20:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31  2:39 [PATCH] mm/dmapool.c: add WARN_ON() in dma_pool_destroy qiang.zhang
2020-07-31  2:38 ` Matthew Wilcox
2020-07-31 20:32   ` Andrew Morton
2020-07-31 20:49     ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).