Re: [PATCH 2/2] mm: Fix devm_memremap_pages() collision handling

From: Dan Williams
Date: Fri Jan 19 2018 - 19:16:06 EST


On Wed, Jan 17, 2018 at 4:06 PM, Jan H. SchÃnherr <jschoenh@xxxxxxxxx> wrote:
> If devm_memremap_pages() detects a collision while adding entries
> to the radix-tree, we call pgmap_radix_release(). Unfortunately,
> the function removes *all* entries for the range -- including the
> entries that caused the collision in the first place.
>
> Modify pgmap_radix_release() to take an additional argument to
> indicate where to stop, so that only newly added entries are removed
> from the tree.
>
> Fixes: 9476df7d80df ("mm: introduce find_dev_pagemap()")
> Signed-off-by: Jan H. SchÃnherr <jschoenh@xxxxxxxxx>

Looks good to me, applied for 4.16.