Skip to content

Commit 412050a

Browse files
Claudio ImbrendaAlexander Gordeev
authored andcommitted
s390/mm: Fix clearing storage keys for huge pages
The function __storage_key_init_range() expects the end address to be the first byte outside the range to be initialized. I.e. end - start should be the size of the area to be initialized. The current code works because __storage_key_init_range() will still loop over every page in the range, but it is slower than using sske_frame(). Fixes: 3afdfca ("s390/mm: Clear skeys for newly mapped huge guest pmds") Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Claudio Imbrenda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 843c328 commit 412050a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/mm/hugetlbpage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static void clear_huge_pte_skeys(struct mm_struct *mm, unsigned long rste)
139139
}
140140

141141
if (!test_and_set_bit(PG_arch_1, &page->flags))
142-
__storage_key_init_range(paddr, paddr + size - 1);
142+
__storage_key_init_range(paddr, paddr + size);
143143
}
144144

145145
void __set_huge_pte_at(struct mm_struct *mm, unsigned long addr,

0 commit comments

Comments
 (0)