From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2E45C3404C for ; Wed, 19 Feb 2020 02:10:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D71D0207FD for ; Wed, 19 Feb 2020 02:10:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727893AbgBSCKA (ORCPT ); Tue, 18 Feb 2020 21:10:00 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:44634 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726698AbgBSCKA (ORCPT ); Tue, 18 Feb 2020 21:10:00 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 2128C5D71AAFCBFCA923; Wed, 19 Feb 2020 10:09:57 +0800 (CST) Received: from [127.0.0.1] (10.177.246.209) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Wed, 19 Feb 2020 10:09:47 +0800 Subject: Re: [PATCH] mm/hugetlb: avoid get wrong ptep caused by race To: Matthew Wilcox CC: , , , , , , , References: <1582027825-112728-1-git-send-email-longpeng2@huawei.com> <20200218205239.GE24185@bombadil.infradead.org> From: "Longpeng (Mike)" Message-ID: <593d82a3-1d1e-d8f2-6b90-137f10441522@huawei.com> Date: Wed, 19 Feb 2020 10:09:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200218205239.GE24185@bombadil.infradead.org> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.246.209] X-CFilter-Loop: Reflected Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org ÔÚ 2020/2/19 4:52, Matthew Wilcox дµÀ: > On Tue, Feb 18, 2020 at 08:10:25PM +0800, Longpeng(Mike) wrote: >> { >> - pgd_t *pgd; >> - p4d_t *p4d; >> - pud_t *pud; >> - pmd_t *pmd; >> + pgd_t *pgdp; >> + p4d_t *p4dp; >> + pud_t *pudp, pud; >> + pmd_t *pmdp, pmd; > > Renaming the variables as part of a fix is a really bad idea. It obscures > the actual fix and makes everybody's life harder. Plus, it's not even > renaming to follow the normal convention -- there are only two places > (migrate.c and gup.c) which follow this pattern in mm/ while there are > 33 that do not. > Good suggestion, I've never noticed this, thanks. By the way, could you give an example if we use this way to fix the bug? > > . > -- Regards, Longpeng(Mike)