Re: [PATCH v5 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-09-18 Thread Jerome Glisse
On Wed, Sep 12, 2018 at 07:22:17PM -0700, Dan Williams wrote: > The last step before devm_memremap_pages() returns success is to > allocate a release action, devm_memremap_pages_release(), to tear the > entire setup down. However, the result from devm_add_action() is not > checked. > > Checking th

Re: [PATCH v5 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-09-14 Thread Dan Williams
On Fri, Sep 14, 2018 at 6:16 AM, Christoph Hellwig wrote: >> An argument could be made to require that the ->kill() operation be set >> in the @pgmap arg rather than passed in separately. However, it helps >> code readability, tracking the lifetime of a given instance, to be able >> to grep the ki

Re: [PATCH v5 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-09-14 Thread Christoph Hellwig
> An argument could be made to require that the ->kill() operation be set > in the @pgmap arg rather than passed in separately. However, it helps > code readability, tracking the lifetime of a given instance, to be able > to grep the kill routine directly at the devm_memremap_pages() call > site.

[PATCH v5 3/7] mm, devm_memremap_pages: Fix shutdown handling

2018-09-12 Thread Dan Williams
The last step before devm_memremap_pages() returns success is to allocate a release action, devm_memremap_pages_release(), to tear the entire setup down. However, the result from devm_add_action() is not checked. Checking the error from devm_add_action() is not enough. The api currently relies on