mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
s390/mm,ptdump: hold memory hotplug lock while walking for kernel page table dump
This is the s390 variant of commit bf2b59f60e
("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: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
9d719d39aa
commit
36c2733c43
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue