]> git.baikalelectronics.ru Git - kernel.git/commit
parisc: mm: don't count preallocated pmds
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 18 Mar 2015 17:42:38 +0000 (13:42 -0400)
committerHelge Deller <deller@gmx.de>
Mon, 23 Mar 2015 11:28:15 +0000 (12:28 +0100)
commitf636f6c3ef3a2046fe9a8d96af4d4e7d2cb5887d
tree3a648fc0931decd74a2bbb3daae418e5ddc96d5c
parent3f3187b1e5d74b42d50252d66d2a86a743cf9e85
parisc: mm: don't count preallocated pmds

The patch 766ca42cf9432bf3549a8ac77ae7fd32863fc088 that counts pmds
allocated for a process introduced a bug on 64-bit PA-RISC kernels.

The PA-RISC architecture preallocates one pmd with each pgd. This
preallocated pmd can never be freed - pmd_free does nothing when it is
called with this pmd. When the kernel attempts to free this preallocated
pmd, it decreases the count of allocated pmds. The result is that the
counter underflows and this error is reported.

This patch fixes the bug by artifically incrementing the counter in
pmd_free when the kernel tries to free the preallocated pmd.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/include/asm/pgalloc.h