]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] pud_present/pmd_present bug.
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 17 Dec 2007 15:25:48 +0000 (16:25 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 17 Dec 2007 15:25:56 +0000 (16:25 +0100)
commit5af849775532899558511ddb675f73c397ff4f3a
tree91c84873a7ece09888542d612a928e54c2fba6a3
parentda18cc2dc852c52239cec25864dd1d75aa517433
[S390] pud_present/pmd_present bug.

Git commit 197da5d046d33be496b7c2fdbbbb1faab5bcf06d (yeah my own :-/)
introduced a bug in regard to pud/pmd table entries.
If the address of the page table refered to by a pud/pmd value happens
to have zeroes in the lower 32 bits, pud_present and pmd_present return
false. The obvious effect is that this triggers the BUG_ON in exit_mmap
because some ptes will not get released on process end.  Worse is that
the next fault for memory covered by that pud/pmd will allocate another
pmd/pte table and populate the pud/pmd entry. The old page table
entries hanging below this entry are lost!

The fix is simple, properly check against 0. The check is added for
pud_none/pmd_none as well even if these two functions work because
the invalid bit is in the lower 32 bits.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
include/asm-s390/pgtable.h