summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/export.c
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2018-11-30 23:10:47 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2018-11-30 23:56:15 +0100
commit06a5e1268a5fb9c2b346a3da6b97e85f2eba0f07 (patch)
treea2ccdfe76f11e07f2538884cb9c607cc90079492 /fs/ocfs2/export.c
parentmm/khugepaged: collapse_shmem() without freezing new_page (diff)
downloadlinux-06a5e1268a5fb9c2b346a3da6b97e85f2eba0f07.tar.xz
linux-06a5e1268a5fb9c2b346a3da6b97e85f2eba0f07.zip
mm/khugepaged: collapse_shmem() do not crash on Compound
collapse_shmem()'s VM_BUG_ON_PAGE(PageTransCompound) was unsafe: before it holds page lock of the first page, racing truncation then extension might conceivably have inserted a hugepage there already. Fail with the SCAN_PAGE_COMPOUND result, instead of crashing (CONFIG_DEBUG_VM=y) or otherwise mishandling the unexpected hugepage - though later we might code up a more constructive way of handling it, with SCAN_SUCCESS. Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261529310.2275@eggly.anvils Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Jerome Glisse <jglisse@redhat.com> Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Cc: Matthew Wilcox <willy@infradead.org> Cc: <stable@vger.kernel.org> [4.8+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/export.c')
0 files changed, 0 insertions, 0 deletions