From patchwork Thu Sep 1 12:00:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12962365 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CC4BECAAD3 for ; Thu, 1 Sep 2022 12:01:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF7148D000C; Thu, 1 Sep 2022 08:01:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EA66C8D000B; Thu, 1 Sep 2022 08:01:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1C8E8D000C; Thu, 1 Sep 2022 08:01:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B609E8D000B for ; Thu, 1 Sep 2022 08:01:12 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 8FE0680C81 for ; Thu, 1 Sep 2022 12:01:12 +0000 (UTC) X-FDA: 79863375984.16.0B90CDB Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf29.hostedemail.com (Postfix) with ESMTP id 789A812008D for ; Thu, 1 Sep 2022 12:01:09 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4MJKKd12W2z1N7f0; Thu, 1 Sep 2022 19:57:25 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 1 Sep 2022 20:01:05 +0800 From: Miaohe Lin To: , , CC: , , Subject: [PATCH v2 09/10] hugetlb: remove meaningless BUG_ON(huge_pte_none()) Date: Thu, 1 Sep 2022 20:00:29 +0800 Message-ID: <20220901120030.63318-10-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220901120030.63318-1-linmiaohe@huawei.com> References: <20220901120030.63318-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662033669; a=rsa-sha256; cv=none; b=OXc/0Dz4PnX3J9CB3N1t6ftChR2NUXpe6pis4kBG+Xo2Cj9tAfz+5YtrCGdfO/OiLiNBSP XtL95p1LDjBqVKuBn172566pdMrt23Q1DW8qBD7dbzDIdwVWP8uKR6lqUEWN6E9dMwjOMw HsLQzufWZkixllriJ8zmWWCOiJ/qfEI= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662033669; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1CS8U1c8a0BLxClvhy1qGLyMJbinkFE44JjvCtvPpsw=; b=Lv/0IDo8snmuMu9nJ97/Z7huqzggFIyvCAbqZ93V42I4KYW415OZcm7Ld4KxRFDBRvUBWX jg05ptbzBNy5vdSsnhrwOfBX2PL6405xDxFBaVWzNI2kLsUzRV48zlm6Va9pyNlHEZoiSO Em2RkPzEsNpDcCwfSKt4PtrGj6TRh1c= X-Rspamd-Queue-Id: 789A812008D Authentication-Results: imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-Rspamd-Server: rspam01 X-Stat-Signature: npxe8hxjes93urpt58hbw9seq8sqtm9f X-HE-Tag: 1662033669-345978 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: When code reaches here, invalid page would have been accessed if huge pte is none. So this BUG_ON(huge_pte_none()) is meaningless. Remove it. Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song --- mm/hugetlb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 2ba45addcdeb..9178ab521c74 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -5379,7 +5379,6 @@ static vm_fault_t hugetlb_wp(struct mm_struct *mm, struct vm_area_struct *vma, u32 hash; put_page(old_page); - BUG_ON(huge_pte_none(pte)); /* * Drop hugetlb_fault_mutex and vma_lock before * unmapping. unmapping needs to hold vma_lock