Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18836773ybl; Fri, 3 Jan 2020 10:00:21 -0800 (PST) X-Google-Smtp-Source: APXvYqz+tFYsYnFi2qpR7ZAByfntIre0MkvLqJgskPBfLz6ZTv7vft33AvOcTknEH77vLL7urWF2 X-Received: by 2002:a9d:799a:: with SMTP id h26mr95869423otm.240.1578074421388; Fri, 03 Jan 2020 10:00:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578074421; cv=none; d=google.com; s=arc-20160816; b=eUk6ByQMm3WT3E1mDwmZP2rDh4mOBezMT3wZc71H26SB9bI6Wz9Fah7jEueF+t/B4v G1lPPkqkKN0dEQ3LlL855qcRuJhe9rmiON2PGLMC8gzcpCuZDpg85n//Nt+7F6ovct5z YfnpeeKjIgP9QfRcLh3KkDnm6xv8OqYdNvoFlzDWGJOcch4nDuc3UuiHn84faq2naHIa /9DwWiZex40hmC4XsikgB1pmmXX1YP+24E/MUi/kWnHHH9fnL0QSSqLJISvknn3k0FhZ g+TTA5ofyMhER1jN/LLh4amBGGOV5e3Pee9mFot0F6OxCoSc4WbWIGsNnG8Q9wF0cp92 65rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Dwg52ekGkl9nKmJXL2HlQ1KyCKoDg9K/QsJcIiIz2Qs=; b=KcyY4uUYLg14b8k3pwETq1cmkWx+bfUKAgtyP8WR/xDbeGTcrYiohTNPlu20OJm4Hw h541wC5DxFNoiYG63JCu+um+vFdkSYkOJD8JHrP+RcZ57uxwGLTxQy+c5tYi7wCicxas 0Gs8O4M3wqBX6o5PAkpngxWevHDTtWDcH3ndIoqXCjDT62enGntdYioRLBu74IrgDzwT Mog7u1PtrOmBnK8lJUlh2c/cOz8vtyuYTEnB7TooFuYbXmUiG5bnPxDhPvKWPczWrtZI cVvFod5eZvHo+MTYccRMMH43F6WqM0W+p7CghsIDv1srasouQmj3aWX7OOyFnzC2D5rg GIqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=Kjre9Ltq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m20si30565383otq.35.2020.01.03.10.00.07; Fri, 03 Jan 2020 10:00:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=Kjre9Ltq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728238AbgACRuW (ORCPT + 99 others); Fri, 3 Jan 2020 12:50:22 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:35014 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728201AbgACRuW (ORCPT ); Fri, 3 Jan 2020 12:50:22 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 003HiDtK140901; Fri, 3 Jan 2020 17:50:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=Dwg52ekGkl9nKmJXL2HlQ1KyCKoDg9K/QsJcIiIz2Qs=; b=Kjre9LtqjEwBTbd3C4YxEUqecoxk4NxBPsY7SO5NmtO1JF5uyZg+Vdhmckt2wDY5k1/C p8inhA2qWpaFmPqWrbamfwGSxlAFAZCh42u7PBuetplOm8AYwSfh1cqxNTXkq1q56GFx 7XdeJ5jlX6CzkYRYEc4uDrglLaqzqRi6yBIfrVNQSalLCzByvJqSZWoNuddHZtCkuHeE zCEtyEzjZ86gdv+fgZxR9RLI94WGammtj0qGTDzKsdYZqYmRzzG52kRDNgy3YygpDY23 Vesniv/w996qoKy5EJ3Q+QeWfMuodJiNSVNJv/aK+xO2l167ECkB1nJYAjAEmWgd7ju7 SA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2x5ypqwfpx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Jan 2020 17:50:16 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 003HiUEo189352; Fri, 3 Jan 2020 17:50:16 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2xa06tycbx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Jan 2020 17:50:15 +0000 Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 003HoD45022317; Fri, 3 Jan 2020 17:50:14 GMT Received: from [192.168.1.206] (/71.63.128.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 03 Jan 2020 09:50:13 -0800 Subject: Re: [PATCH] mm/hugetlbfs: fix for_each_hstate() loop in init_hugetlbfs_fs() To: Jan Stancek , akpm@linux-foundation.org, linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org References: From: Mike Kravetz Message-ID: Date: Fri, 3 Jan 2020 09:50:12 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9489 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001030163 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9489 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001030163 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/3/20 9:37 AM, Jan Stancek wrote: > LTP memfd_create04 started failing for some huge page sizes > after v5.4-10135-gc3bfc5dd73c6. > > Problem is check introduced to for_each_hstate() loop that should > skip default_hstate_idx. Since it doesn't update 'i' counter, all > subsequent huge page sizes are skipped as well. > > Fixes: 8fc312b32b25 ("mm/hugetlbfs: fix error handling when setting up mounts") > Signed-off-by: Jan Stancek Thank you Jan! My apologies for a relatively obvious bug. Testing on x86 did not catch this as the default hstate is set up last in the list. Not an excuse, but that is why I missed it. :( Reviewed-by: Mike Kravetz -- Mike Kravetz