diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/memremap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/memremap.c b/kernel/memremap.c index 06123234f118..426547a21a0c 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -245,7 +245,8 @@ static void devm_memremap_pages_release(struct device *dev, void *data) /* pages are dead and unused, undo the arch mapping */ align_start = res->start & ~(SECTION_SIZE - 1); - align_size = ALIGN(resource_size(res), SECTION_SIZE); + align_size = ALIGN(res->start + resource_size(res), SECTION_SIZE) + - align_start; lock_device_hotplug(); mem_hotplug_begin(); |