]> git.baikalelectronics.ru Git - kernel.git/commit
mm/hwpoison: fix refcount of THP head page in no-injection case
authorWanpeng Li <wanpeng.li@hotmail.com>
Tue, 8 Sep 2015 22:03:18 +0000 (15:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 8 Sep 2015 22:35:28 +0000 (15:35 -0700)
commitade6e045a28da55c64aac805b3f459ebfe69238f
tree478a90a3b91ecb5902777a75362521506b7f7eb2
parent5bb234ed6d359f507d51a93dba0ac74d0d7d4b9e
mm/hwpoison: fix refcount of THP head page in no-injection case

Hwpoison injection takes a refcount of target page and another refcount
of head page of THP if the target page is the tail page of a THP.
However, current code doesn't release the refcount of head page if the
THP is not supported to be injected wrt hwpoison filter.

Fix it by reducing the refcount of head page if the target page is the
tail page of a THP and it is not supported to be injected.

Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hwpoison-inject.c