sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write()
David Miller
AppliedFrom: Tom Hromatka <[email protected]>
Date: Fri, 31 Mar 2017 16:31:42 -0600
Quoted 12 lines
This commit moves sparc64's prototype of
pmd_write()outside of theCONFIG_TRANSPARENT_HUGEPAGEifdef.In 2013, commit
a7b9403f0e6d("sparc64: Encode huge PMDs using PTE encoding.") exposed a path wherepmd_write()could be called withoutCONFIG_TRANSPARENT_HUGEPAGEdefined. This can result in the panic below.The diff is awkward to read, but the changes are straightforward.
pmd_write()was moved outside of #ifdefCONFIG_TRANSPARENT_HUGEPAGE. Also,__HAVE_ARCH_PMD_WRITEwas defined.kernel BUG at
include/asm-generic/pgtable.h:576!
...
Quoted 1 line
Signed-off-by Tom Hromatka <[email protected]>
Applied.