Skip to contentSkip to conversation

sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write()

PATCH David Miller 1 participant 1 message Apr 6, 2017

lore
Share & tools
lore

David Miller

author Applied
#0 lore raw

From: 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 the CONFIG_TRANSPARENT_HUGEPAGE ifdef.

In 2013, commit a7b9403f0e6d ("sparc64: Encode huge PMDs using PTE encoding.") exposed a path where pmd_write() could be called without CONFIG_TRANSPARENT_HUGEPAGE defined. This can result in the panic below.

The diff is awkward to read, but the changes are straightforward. pmd_write() was moved outside of #ifdef CONFIG_TRANSPARENT_HUGEPAGE. Also, __HAVE_ARCH_PMD_WRITE was defined.

kernel BUG at include/asm-generic/pgtable.h:576!

...

Quoted 1 line

Applied.