sparc64: Fix bugs in get_user_pages_fast() wrt. THP.
authorDavid S. Miller <davem@davemloft.net>
Fri, 25 Apr 2014 17:21:12 +0000 (10:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Aug 2014 01:38:25 +0000 (09:38 +0800)
commitb38b6f2820dc4da30e018f36aa064344e7182139
tree4da46b5d9d4b2464a26d6f21d55599b4b10958e6
parenta73d6bccb870b403451cfc325520a424bda135fe
sparc64: Fix bugs in get_user_pages_fast() wrt. THP.

[ Upstream commit 04df419de34104d8818b8c5cffaa062fa36d20ea ]

The large PMD path needs to check _PAGE_VALID not _PAGE_PRESENT, to
decide if it needs to bail and return 0.

pmd_large() should therefore just check _PAGE_PMD_HUGE.

Calls to gup_huge_pmd() are guarded with a check of pmd_large(), so we
just need to add a valid bit check.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/sparc/include/asm/pgtable_64.h
arch/sparc/mm/gup.c