Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2104653pxa; Mon, 24 Aug 2020 05:25:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFA87TDxovIYvBL/AYRcmv4LQiLY+DUYSC3KN3xMaUdVlhCkMuIPq99Qyh6XrHthhqrGMK X-Received: by 2002:a17:906:813:: with SMTP id e19mr1476176ejd.141.1598271914045; Mon, 24 Aug 2020 05:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598271914; cv=none; d=google.com; s=arc-20160816; b=DAZjczvcqK9SKehUjoVQ/Ez5LmV5qoi21ZX1+mj/HPSrc2ULqrRg7hSUtJqPT0dZ5t 55pKUFke28PTQY0dkyBu2VUZWJw51cPd+GwItji0hWiOvB3sVghAWfVKUcfziZH7vHhA ouiCQ3xZo7m9yQgdOyIus92TzExWbj2Ia3k5XROQ34auPoSxRWJkKFME7SJ85QxHAFsS bUWQLxNaFiZo5JLP4w5E+NHrEXFVfroBqptWjxZZsUJt3N8E7EOSOPNgdG11X79PD3V8 d7ncA1q7KAPcntpl6CViNvoZbOTOXqJEfkUqYI9dkXYoDVELdnj8T7H7QXNIqHN3ZxTI XkPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=czbuRi76VLfRFeolY8N3LquEPe/fs67DTvZoOHfuIIU=; b=f8p+/3ET26QvP4g5rFDC7yvw/3Wkvcu9QPSzDCPGKcWDZyFIaehewIPASPesGssoyv t/Tbbq9zNe+O90GZl2ZZbLANZsX9a7BYxdMlii3gRABHMeTbtDRWQ0zKXIqX8+jlmtgn 3Ww8X0y14ux/VfD1InClIFDySUUoMri1XGtafLO9fGxjGYWoxgdXxVvrO2TUwpru7scK /Qf9qfXwlB6o/HMCpKh/XuELJHo9fbDifC7sYo1boXwZByrKo6FquAb+aEPOdYd1eXrC NbAfhCbA0+oh9KGw9rlOuUC7WLui75fQ01EyOD9MqkSn2ACqQz4496d0fEIRE/g35og4 SXjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si6455900edn.222.2020.08.24.05.24.50; Mon, 24 Aug 2020 05:25:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbgHXMV6 (ORCPT + 99 others); Mon, 24 Aug 2020 08:21:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:48702 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725906AbgHXMV5 (ORCPT ); Mon, 24 Aug 2020 08:21:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 066CDAC7F; Mon, 24 Aug 2020 12:22:26 +0000 (UTC) Date: Mon, 24 Aug 2020 14:21:52 +0200 From: Oscar Salvador To: nao.horiguchi@gmail.com Cc: linux-mm@kvack.org, mhocko@kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com, tony.luck@intel.com, david@redhat.com, aneesh.kumar@linux.vnet.ibm.com, zeil@yandex-team.ru, cai@lca.pw, naoya.horiguchi@nec.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 12/12] mm,hwpoison: double-check page count in __get_any_page() Message-ID: <20200824122151.GC7491@linux> References: <20200806184923.7007-1-nao.horiguchi@gmail.com> <20200806184923.7007-13-nao.horiguchi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200806184923.7007-13-nao.horiguchi@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 06, 2020 at 06:49:23PM +0000, nao.horiguchi@gmail.com wrote: > From: Naoya Horiguchi > > Soft offlining could fail with EIO due to the race condition with > hugepage migration. This issuse became visible due to the change by > previous patch that makes soft offline handler take page refcount > by its own. We have no way to directly pin zero refcount page, and > the page considered as a zero refcount page could be allocated just > after the first check. > > This patch adds the second check to find the race and gives us > chance to handle it more reliably. > > Reported-by: Qian Cai > Signed-off-by: Naoya Horiguchi Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE L3