Commit 36c2733c authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

s390/mm,ptdump: hold memory hotplug lock while walking for kernel page table dump

This is the s390 variant of commit bf2b59f6 ("arm64/mm: Hold
memory hotplug lock while walking for kernel page table dump").

Right now this doesn't fix any real bug, however as soon as kvm
patches get merged which make use of memory remove we might end up
dereferencing/accessing freed page tables.

Therefore fix this potential bug already now.
Reviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 9d719d39
......@@ -129,7 +129,9 @@ static int ptdump_show(struct seq_file *m, void *v)
.marker = address_markers,
};
get_online_mems();
ptdump_walk_pgd(&st.ptdump, &init_mm, NULL);
put_online_mems();
return 0;
}
DEFINE_SHOW_ATTRIBUTE(ptdump);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment