David Miller 2679494246 mm: Fix generic hugetlb pte check return type.
The include/asm-generic/hugetlb.h stubs that just vector huge_pte_*()
calls to the pte_*() implementations won't work in certain situations.

x86 and sparc, for example, return "unsigned long" from the bit
checks, and just go "return pte_val(pte) & PTE_BIT_FOO;"

But since huge_pte_*() returns 'int', if any high bits on 64-bit are
relevant, they get chopped off.

The net effect is that we can loop forever trying to COW a huge page,
because the huge_pte_write() check signals false all the time.

Reported-by: Gurudas Pai <gurudas.pai@oracle.com>
Tested-by: Gurudas Pai <gurudas.pai@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: David Rientjes <rientjes@google.com>
2013-10-02 20:02:35 -04:00
..
2012-03-28 18:30:03 +01:00
2012-10-03 21:33:53 +02:00
2008-05-01 08:03:58 -07:00
2009-06-11 21:02:42 +02:00
2011-03-17 09:19:04 +08:00
2010-10-07 14:08:55 +01:00
2005-04-16 15:20:36 -07:00
2010-10-07 14:08:55 +01:00
2012-10-02 18:01:56 +01:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2012-12-09 23:14:14 +01:00
2013-01-03 15:57:16 -08:00
2012-02-23 20:19:04 -07:00
2010-09-10 10:56:51 +02:00
2012-11-29 00:01:23 -05:00
2012-04-14 11:13:19 +10:00
2013-02-14 09:21:15 -05:00
2009-06-11 21:02:42 +02:00