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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200731023858.GO23808@casper.infradead.org>
Date:   Fri, 31 Jul 2020 03:38:58 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     qiang.zhang@...driver.com
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/dmapool.c: add WARN_ON() in dma_pool_destroy

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ