]> git.baikalelectronics.ru Git - kernel.git/commit
Wrong page freed on preallocate_pmds() failure exit
authorAl Viro <viro@ZenIV.linux.org.uk>
Wed, 20 Nov 2013 22:16:36 +0000 (22:16 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Nov 2013 22:22:14 +0000 (14:22 -0800)
commitfc12f0aa03060832941acb4acbb2319a070b5332
treed1bb3671fed7746110175a480b72a543bfd3d271
parentc5285eae746e2dba8381a5ea32002f78de1806ac
Wrong page freed on preallocate_pmds() failure exit

Note that pmds[i] is simply uninitialized at that point...

Granted, it's very hard to hit (you need split page locks *and*
kmalloc(sizeof(spinlock_t), GFP_KERNEL) failing), but the code is
obviously bogus.

Introduced by commit dbf71bc4eae9 ("x86: add missed
pgtable_pmd_page_ctor/dtor calls for preallocated pmds")

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/mm/pgtable.c