public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: qiang.zhang@windriver.com
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/dmapool.c: add WARN_ON() in dma_pool_destroy
Date: Fri, 31 Jul 2020 03:38:58 +0100	[thread overview]
Message-ID: <20200731023858.GO23808@casper.infradead.org> (raw)
In-Reply-To: <20200731023939.19206-1-qiang.zhang@windriver.com>

On Fri, Jul 31, 2020 at 10:39:39AM +0800, qiang.zhang@windriver.com wrote:
> 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.

There's already a warning message.  What value does this actually have?

> 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
> 


  reply	other threads:[~2020-07-31  2:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-07-31 20:32   ` Andrew Morton
2020-07-31 20:49     ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200731023858.GO23808@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=qiang.zhang@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox