aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Wagner <wagi@monom.org>2018-04-03 17:17:06 +0200
committerDaniel Wagner <wagi@monom.org>2018-04-03 17:17:06 +0200
commit5a354feaf85dd6214520365b7ac490948e1c0c3d (patch)
tree50bdd7f6d4f1c079015130f63adae66cbbb48e88 /lib
parente3dda859fe4eb6f61a0b83ed405bcf13b3ec9444 (diff)
parentaec8e72ebde913a205f5c466d718bd5fe14ab440 (diff)
Merge tag 'v4.4.125' into v4.4-rt
This is the 4.4.125 stable release
Diffstat (limited to 'lib')
-rw-r--r--lib/ioremap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ioremap.c b/lib/ioremap.c
index 86c8911b0e3a..5323b59ca393 100644
--- a/lib/ioremap.c
+++ b/lib/ioremap.c
@@ -83,7 +83,8 @@ static inline int ioremap_pmd_range(pud_t *pud, unsigned long addr,
if (ioremap_pmd_enabled() &&
((next - addr) == PMD_SIZE) &&
- IS_ALIGNED(phys_addr + addr, PMD_SIZE)) {
+ IS_ALIGNED(phys_addr + addr, PMD_SIZE) &&
+ pmd_free_pte_page(pmd)) {
if (pmd_set_huge(pmd, phys_addr + addr, prot))
continue;
}
@@ -109,7 +110,8 @@ static inline int ioremap_pud_range(pgd_t *pgd, unsigned long addr,
if (ioremap_pud_enabled() &&
((next - addr) == PUD_SIZE) &&
- IS_ALIGNED(phys_addr + addr, PUD_SIZE)) {
+ IS_ALIGNED(phys_addr + addr, PUD_SIZE) &&
+ pud_free_pmd_page(pud)) {
if (pud_set_huge(pud, phys_addr + addr, prot))
continue;
}