Naoya Horiguchi 7a71932d56 kpageflags: fix wrong KPF_THP on non-huge compound pages
KPF_THP can be set on non-huge compound pages (like slab pages or pages
allocated by drivers with __GFP_COMP) because PageTransCompound only
checks PG_head and PG_tail.  Obviously this is a bug and breaks user space
applications which look for thp via /proc/kpageflags.

This patch rules out setting KPF_THP wrongly by additionally checking
PageLRU on the head pages.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:23:00 +09:00
..
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:12 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:08 +09:00
2012-10-03 08:48:21 -07:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:31 +09:00
2012-10-09 16:22:17 +09:00
2012-10-09 16:22:17 +09:00
2012-09-07 14:57:46 -04:00
2012-09-26 22:20:20 -04:00
2012-09-26 21:10:06 -04:00
2012-09-22 20:48:18 -04:00
2012-09-26 21:08:52 -04:00
2012-10-06 03:04:56 +09:00