Skip to content

Commit edde060

Browse files
committed
Merge branch 'for-next/set_memory' into for-next/core
* for-next/set_memory: : Fix + documentation for the arm64 change_memory_common() arm64/mm: Document why linear map split failure upon vm_reset_perms is not problematic arm64/pageattr: Propagate return value from __change_memory_common
2 parents 52c4d1d + 0c2988a commit edde060

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

arch/arm64/mm/pageattr.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ static int change_memory_common(unsigned long addr, int numpages,
148148
unsigned long size = PAGE_SIZE * numpages;
149149
unsigned long end = start + size;
150150
struct vm_struct *area;
151+
int ret;
151152

152153
if (!PAGE_ALIGNED(addr)) {
153154
start &= PAGE_MASK;
@@ -186,8 +187,10 @@ static int change_memory_common(unsigned long addr, int numpages,
186187
unsigned long idx = (start - (unsigned long)kasan_reset_tag(area->addr))
187188
>> PAGE_SHIFT;
188189
for (; numpages; idx++, numpages--) {
189-
__change_memory_common((u64)page_address(area->pages[idx]),
190-
PAGE_SIZE, set_mask, clear_mask);
190+
ret = __change_memory_common((u64)page_address(area->pages[idx]),
191+
PAGE_SIZE, set_mask, clear_mask);
192+
if (ret)
193+
return ret;
191194
}
192195
}
193196

0 commit comments

Comments
 (0)