]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] vmemmap: allocate struct pages before 1:1 mapping
authorChristian Borntraeger <borntraeger@de.ibm.com>
Sat, 26 Jan 2008 13:11:16 +0000 (14:11 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Sat, 26 Jan 2008 13:11:23 +0000 (14:11 +0100)
commit1b275f07bfc070cca9afc61efcd8ffa144add4ab
treef89c7119bcb00826a7ed99b14d2bbe7d2edcc043
parent39b2729e9b8cd3ea538082e7ad2c0d53ac03b182
[S390] vmemmap: allocate struct pages before 1:1 mapping

We have seen an oops in an OOM situation, where show_mem tried to
access the struct page of a dcss segment. The vmemmap code has
already created the 1:1 mapping but failed allocating the struct
pages. In the OOM case, show_mem now walks the memory. It uses
pfn_valid to detect if it may access the struct page. In the case
described above, the mapping was established and pfn_valid returned
true. As the struct pages were not allocated, the kernel oopsed.

We have to ensure that we have created the struct pages, before we
add a mapping pointing to the pages.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/vmem.c