Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp398978pxb; Wed, 24 Feb 2021 05:22:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYx7xn3dHF7mQdWBajvtpGNBDqEfIY1+0gSXVHE89VTvolo2rzToKHkDRrq/M25Lgoaq5Q X-Received: by 2002:a17:906:af10:: with SMTP id lx16mr31809881ejb.192.1614172945225; Wed, 24 Feb 2021 05:22:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614172945; cv=none; d=google.com; s=arc-20160816; b=08OCiyalxwOMpDeXuxHtannEW8HLpTx+ybk4yjOJIUtI5tMu2R92AaPYjpAPTTZtuF ss8q6VRK+baXxQFSUThTKk6BzLdWY/darwU1PbuQnyjvOA1WbBQoOa2Abr8zcpZAWsn8 V2Bd5z8w9ZJLDmljj+BoOuKxr64BUEH/DGcQVnPs9KW4U4DtRt34HXAmoHMP7XHDJhz4 VoD9u51MAbRr8Fc/NBm4Sx1VzORGJ8YGNrjKtalKwjp3tRJUaYvg985PQHlHBNL7yGY4 kyFkkCO9X6k5764fiDtHRQrP+uNu+Vlk5x0i5XHDfsBB7C+R3Kum/ZysBlFs7yTzQd4X weEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=5njn8aIcHQ3yNX13YT/XbvsZx6lv9VSH3BdkBnlMBRQ=; b=m7fc1WiDR4MtzEBvphiHF2pGsrf/Ngj3dQkRNvjTdbDM1ExlanjobxWvcShGmRTUsk ArTFfarnYVNk0+1Iv7IVVgq0MstN6q1m4ha5QSUXYA7jUvS5NLQ97s9Y8QGIlbkatHHn E5D/r5b//wUS0IHNjqLnh3G22x7T4Y8o6n2npHg5fNllwoObzvNkTJX9koQQzj8Ahn6z 8lh6occSueZupM5WGeFQnykwe6JQlvrqxdcJBlG3Z/ZA+Th1oWvQL30i4jKbBONnza7P 435nwNY7N04EOH+a3kfSqckdkSEXrF7JKQ4SIzaOZCYh4nbtbUjkyend4EWR2Db4h5I2 LLNQ== 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 q3si1268069ejt.322.2021.02.24.05.21.33; Wed, 24 Feb 2021 05:22:25 -0800 (PST) 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 S233455AbhBXMlD (ORCPT + 99 others); Wed, 24 Feb 2021 07:41:03 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:12951 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbhBXMlC (ORCPT ); Wed, 24 Feb 2021 07:41:02 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DlwTJ0jnNzjQ53; Wed, 24 Feb 2021 20:39:00 +0800 (CST) Received: from [10.67.102.197] (10.67.102.197) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Wed, 24 Feb 2021 20:40:08 +0800 Subject: Re: [PATCH stable-rc queue/4.9 1/1] futex: Provide distinct return value when owner is exiting To: Greg KH CC: , , , , , References: <20210222070328.102384-1-nixiaoming@huawei.com> <20210222070328.102384-2-nixiaoming@huawei.com> <3bc570f6-f8af-b0a2-4d62-13ed4adc1f33@huawei.com> <76f6a446-41db-3b7a-dcab-a85d0841654f@huawei.com> <2e8cf845-30ee-22c2-428a-b56e03cb49e4@huawei.com> From: Xiaoming Ni Message-ID: <0b9d35bd-12a9-22f2-e08e-b3e8f0d268dd@huawei.com> Date: Wed, 24 Feb 2021 20:40:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.197] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/24 15:47, Greg KH wrote: > On Wed, Feb 24, 2021 at 09:41:01AM +0800, Xiaoming Ni wrote: >> On 2021/2/23 21:00, Greg KH wrote: >>> On Mon, Feb 22, 2021 at 10:11:37PM +0800, Xiaoming Ni wrote: >>>> On 2021/2/22 20:09, Greg KH wrote: >>>>> On Mon, Feb 22, 2021 at 06:54:06PM +0800, Xiaoming Ni wrote: >>>>>> On 2021/2/22 18:16, Greg KH wrote: >>>>>>> On Mon, Feb 22, 2021 at 03:03:28PM +0800, Xiaoming Ni wrote: >>>>>>>> From: Thomas Gleixner >>>>>>>> >>>>>>>> commit ac31c7ff8624409ba3c4901df9237a616c187a5d upstream. >>>>>>> This commit is already in the 4.9 tree. If the backport was incorrect, >>>>>>> say that here, and describe what went wrong and why this commit fixes >>>>>>> it. >>>>>>> >>>>>>> Also state what commit this fixes as well, otherwise this changelog just >>>>>>> looks like it is being applied again to the tree, which doesn't make >>>>>>> much sense. >>>>>>> >>>>>>> thanks, >>>>>>> >>>>>>> greg k-h >>>>>>> . >>>>>> >>>>>> I wrote a cover for it. but forgot to adjust the title of the cover: >>>>>> >>>>>> https://lore.kernel.org/lkml/20210222070328.102384-1-nixiaoming@huawei.com/ >>>>>> >>>>>> >>>>>> I found a dead code in the queue/4.9 branch of the stable-rc repository. >>>>>> >>>>>> 2021-02-03: >>>>>> commit c27f392040e2f6 ("futex: Provide distinct return value when >>>>>> owner is exiting") >>>>>> The function handle_exit_race does not exist. Therefore, the >>>>>> change in handle_exit_race() is ignored in the patch round. >>>>>> >>>>>> 2021-02-22: >>>>>> commit e55cb811e612 ("futex: Cure exit race") >>>>>> Define the handle_exit_race() function, >>>>>> but no branch in the function returns EBUSY. >>>>>> As a result, dead code occurs in the attach_to_pi_owner(): >>>>>> >>>>>> int ret = handle_exit_race(uaddr, uval, p); >>>>>> ... >>>>>> if (ret == -EBUSY) >>>>>> *exiting = p; /* dead code */ >>>>>> >>>>>> To fix the dead code, modify the commit e55cb811e612 ("futex: Cure exit >>>>>> race"), >>>>>> or install a patch to incorporate the changes in handle_exit_race(). >>>>>> >>>>>> I am unfamiliar with the processing of the stable-rc queue branch, >>>>>> and I cannot find the patch mail of the current branch in >>>>>> https://lore.kernel.org/lkml/?q=%22futex%3A+Cure+exit+race%22 >>>>>> Therefore, I re-integrated commit ac31c7ff8624 ("futex: Provide distinct >>>>>> return value when owner is exiting"). >>>>>> And wrote a cover (but forgot to adjust the title of the cover): >>>>>> >>>>>> https://lore.kernel.org/lkml/20210222070328.102384-1-nixiaoming@huawei.com/ >>>>> >>>>> So this is a "fixup" patch, right? >>>>> >>>>> Please clearly label it as such in your patch description and resend >>>>> this as what is here I can not apply at all. >>>>> >>>>> thanks, >>>>> >>>>> greg k-h >>>>> . >>>>> >>>> Thank you for your guidance. >>>> I have updated the patch description and resent the patch based on >>>> v4.9.258-rc1 >>>> https://lore.kernel.org/lkml/20210222125352.110124-1-nixiaoming@huawei.com/ >>> >>> Can you please try 4.9.258 and let me know if this is still needed or >>> not? >>> >>> thanks, >>> >>> greg k-h >>> . >>> >> The dead code problem still exists in V4.9.258. No conflict occurs during my >> patch integration. Do I need to correct the version number marked in the cc >> table in the patch and resend the patch? > > Please do. > > thanks, > > greg k-h > . > I have resend the patch based on v4.9.258. link: https://lore.kernel.org/lkml/20210224100923.51315-1-nixiaoming@huawei.com/ Thanks Xiaoming Ni