Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965255AbbHLI7o (ORCPT ); Wed, 12 Aug 2015 04:59:44 -0400 Received: from TYO202.gate.nec.co.jp ([210.143.35.52]:44184 "EHLO tyo202.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964775AbbHLI7b convert rfc822-to-8bit (ORCPT ); Wed, 12 Aug 2015 04:59:31 -0400 From: Naoya Horiguchi To: Wanpeng Li CC: Andrew Morton , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 4/5] mm/hwpoison: fix refcount of THP head page in no-injection case Thread-Topic: [PATCH v2 4/5] mm/hwpoison: fix refcount of THP head page in no-injection case Thread-Index: AQHQ02Oazc/Er7eDBEW4Sq/oV5DEX54HfJmA Date: Wed, 12 Aug 2015 08:58:59 +0000 Message-ID: <20150812085859.GF32192@hori1.linux.bs1.fc.nec.co.jp> References: <1439206103-86829-1-git-send-email-wanpeng.li@hotmail.com> In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.128.101.24] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: <912AC763C40DC04886D7A14108761F88@gisp.nec.co.jp> Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 37 On Mon, Aug 10, 2015 at 07:28:22PM +0800, Wanpeng Li wrote: > 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 Acked-by: Naoya Horiguchi > --- > mm/hwpoison-inject.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mm/hwpoison-inject.c b/mm/hwpoison-inject.c > index 5015679..9d26fd9 100644 > --- a/mm/hwpoison-inject.c > +++ b/mm/hwpoison-inject.c > @@ -55,7 +55,7 @@ inject: > pr_info("Injecting memory failure at pfn %#lx\n", pfn); > return memory_failure(pfn, 18, MF_COUNT_INCREASED); > put_out: > - put_page(p); > + put_hwpoison_page(p); > return 0; > } > > -- > 1.7.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/