[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8fa535d5-7f8d-8036-0e02-1aee7768bdef@deltatee.com>
Date: Tue, 22 May 2018 11:36:58 -0600
From: Logan Gunthorpe <logang@...tatee.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
stable <stable@...r.kernel.org>, Christoph Hellwig <hch@....de>,
Jérôme Glisse <jglisse@...hat.com>,
Linux MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] mm, devm_memremap_pages: handle errors allocating
final devres action
On 22/05/18 11:25 AM, Dan Williams wrote:
> As far as I can see by then it's too late, or we need to expose
> release details to the caller which defeats the purpose of devm
> semantics.
In the dax/pmem case, I *think* it should be fine...
devm_add_action_or_reset() only calls the action it is passed on failure
not the entire devm chain. In which case, it should drop all the
references to the percpu counter. Then, if on an error return from
devm_memremap_pages() we call dax_pmem_percpu_kill(), the rest of the
devm chain should be called when we return from a failed probe and it
should proceed as usual.
I think dax_pmem_percpu_kill() also must be called on any error return
from devm_memremap_pages and it is currently not...
Logan
Powered by blists - more mailing lists