Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp258546pxj; Wed, 26 May 2021 22:29:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweWqfxCpG68X9kBNtcsbdZmfg5Bits9XmCED97Y7s1q7WlSFK58vED767Nlc3IPbXNiz2K X-Received: by 2002:a05:6402:845:: with SMTP id b5mr2074779edz.9.1622093377720; Wed, 26 May 2021 22:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622093377; cv=none; d=google.com; s=arc-20160816; b=xtXbVC7GsS7tkOcg5Bcu/f0jG/XisAW3OF7zSIwIBtgGJmOLc8Vck9JEh0+bJrJ/mI xkf/nnh8B9PoEpSEah9yARQadXy+PGZfPPCeQcBuUHUd1/E54tzmYwZvvoC1wK3Gipm9 4SWTTkZaDRPQWo5g7gigEaqp4duhIMhXvkZkjyQR4gno4lZ4B89ST6u8OwkbGDojxx2c hk966UTMUFaVbibAvtsOybFZFwwu6yWqpgrSE1iKQ8EGZrP+zBajrAQoWeKYE9XvY4SW xzai6mXRnvYs5Xshm1rm4Hdwm3eEr0DDfkoqwRwHGl9WTzduroXg5phOsZFmqQOBOv2k mcyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4OWnhIRtH41VW4/lCOTjupHX4TklN7EnBtE+milzxdg=; b=r++VJtJEzkZormF8Ckg+SbCtBmJJhLK50ScMwewr6t1fZKWbdQnb1AvdHOD0hxWNUF 1DyP3QYGsFl2OCQ9STi0URmuauqWu6BWLPIecIKzChYv88DI5EYLntdKMU9TJBGslpCD IyRyQ/TeY/nju5tHM1kRc1dSIsoqLEK1sxIiz/ISGnRY8ZZoW0kbmIjNQOxtPiRJe473 nzDo2C/9dVjHXHxk5pHiT4eqtIZJPwBJeQy7KNUWh4m5M0Qi0pcouDz8x9Vt8bG8T79E VQpcQGM+GIRQnv5z+eh+8pRJ+rpN6TEbmjtZMXU7Efz6sB3O5eHnN7gM4mDJZD3o2fvu JyCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=yob++nCZ; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si1056119eds.351.2021.05.26.22.29.14; Wed, 26 May 2021 22:29:37 -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; dkim=pass header.i=@bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=yob++nCZ; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233226AbhE0Cpy (ORCPT + 99 others); Wed, 26 May 2021 22:45:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbhE0Cpx (ORCPT ); Wed, 26 May 2021 22:45:53 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5859C061574 for ; Wed, 26 May 2021 19:44:21 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id e17so2511681pfl.5 for ; Wed, 26 May 2021 19:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4OWnhIRtH41VW4/lCOTjupHX4TklN7EnBtE+milzxdg=; b=yob++nCZ0jBPDz2/M6DUDb2d8Mvwd6Ed95UY9DwG4PoRNTQzWrjv4CXanUrje/xzkf UxQNr2uSSbo8OhSCditOvGbwiWqcbB9qN9m6466EwmfkUQCT9HoakI5Ck/85h+GApPEe uxFZ71gKN41HhskGj4Rohl9fklmpF3EUCOmR0XNv5Cy2AhBjuu0Wlet0h3L0DAoKHtvQ 5DBThvCeEeMKqXSRE75bZdbrVaDj6dleKXCxbNSCl/FdF5Q6Z5M4mlQsdhF5+YGZpHYY R213dFkzbRR+RPOO+WU0WmZBoltgQrlZIfomRpywSEh8j1sXBUuifSA6IWR3aU9CH2zN NvPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4OWnhIRtH41VW4/lCOTjupHX4TklN7EnBtE+milzxdg=; b=hX2vcyUAy0EmmP/sDSQSLTIqDBhoHhPTflzIDQzWjZ5PfwjXHkNboYkb/F6t219+oV IDTmxTAoEL7pCWwfAQWsk5SwVWuPpiFvG0wCFTpzse0nnLe6fW0JK+9keI5rLgimpfuU IBd5ylPgZPu+qZ6BUVtb3JVvJ4d8+x/gcaRBwfAZ5ALbW4ystFwrecxtP5PDjAvwI7dc 6x8iowERl/p6lbUfroOUTL+ZeciuBvN6J5vT5elSj/mWVUF53TNnk1WALr690w1tuMZb o/gMfFkc9oSrUrsI/iRlGtwlnpZvNe/CrMlJMuVk2N6fdpBOlU+L1f4N0GizlYFWkSYc 8Ihg== X-Gm-Message-State: AOAM533pSS0NST64fbAkh4bz4NoQtN9exZ1XTlyuHvZjfA3QLbSTAdiJ Uvm7qTTNQyFGRD8Il65x0CHONLM1YpMtMtAKevUrvQ== X-Received: by 2002:a62:7b07:0:b029:2e3:b540:707f with SMTP id w7-20020a627b070000b02902e3b540707fmr1505473pfc.59.1622083461024; Wed, 26 May 2021 19:44:21 -0700 (PDT) MIME-Version: 1.0 References: <20210526235257.2769473-1-nao.horiguchi@gmail.com> In-Reply-To: <20210526235257.2769473-1-nao.horiguchi@gmail.com> From: Muchun Song Date: Thu, 27 May 2021 10:43:44 +0800 Message-ID: Subject: Re: [External] [PATCH v1] hugetlb: pass head page to remove_hugetlb_page() To: Naoya Horiguchi Cc: Linux Memory Management List , Mike Kravetz , Michal Hocko , Oscar Salvador , Andrew Morton , David Hildenbrand , Naoya Horiguchi , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 27, 2021 at 7:53 AM Naoya Horiguchi wrote: > > From: Naoya Horiguchi > > When memory_failure() or soft_offline_page() is called on a tail page of > some hugetlb page, "BUG: unable to handle page fault" error can be > triggered. > > remove_hugetlb_page() dereferences page->lru, so it's assumed that the > page points to a head page, but one of the caller, > dissolve_free_huge_page(), provides remove_hugetlb_page() with 'page' > which could be a tail page. So pass 'head' to it, instead. > > Fixes: 6eb4e88a6d27 ("hugetlb: create remove_hugetlb_page() to separate functionality") > Signed-off-by: Naoya Horiguchi Thanks Naoya! Reviewed-by: Muchun Song