Re: [PATCH] mm/dmapool.c: add WARN_ON() in dma_pool_destroy

Andrew Morton
2020-07-31T20:32:19Z

On Fri, 31 Jul 2020 03:38:58 +0100 Matthew Wilcox <willy@infradead.org> wrote:

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

Presumably so we get a backtrace in order to identify the errant
caller.

I added a bit to the changelog:

: The pool is being destroyed so all pages which are in the pool should be
: free. If some page is still in use by somebody, we should not just output
: error logs, also should also add a WARN message so the stack backtrace may
: be used to identify the caller.