Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1473117pxb; Mon, 22 Feb 2021 02:56:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwM/m+DMAhHOMziS7pqXlqP25PeVb9zeLh/yr35pj8X468VmjpJ5gNbvbgFBn+Qyb2kPOVH X-Received: by 2002:a05:6402:b9a:: with SMTP id cf26mr6859321edb.183.1613991406373; Mon, 22 Feb 2021 02:56:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613991406; cv=none; d=google.com; s=arc-20160816; b=plY+JT3AtqOLj966nikDQ/m/Vfkgw2b0PSrGIbDOtkjEHLNEPEFlN03ZuS5tvB60ZK iwj7pxGLjfDyAhpwXXbqbTNszg2tZdvkoE28yHWmT95b486UnOPopK1RQ6stEtUTa0xi qZLMOFueyKnFRIXtslqdlllgop3vg3BIW87Tua2YgZ2G7x+eQ1i16l8RoQJM7kNAXJXG 6DLmnHNnIaD4cuWTFSGqxfN91VznsTmWSmH2/A2fUZGq767ikroJ/ARH3+ma6wixaD4n Zg71gdqwJ0529F+Hwnb/poSJ4O6FYYDGyecI367oEdHuVniKLJ7iHA6E4pnhgx55elq6 pgNg== 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=SZM6dmgDG0A6AyqkW5nMiaFnvrCT63ItnuISakFmDmc=; b=peHeq3VI88OPfzrU1XYq/p0KvlUzAn+FII2nVxWZcr6JaJVQ9m9juG/Sk9ZPluSQ4+ fhjFbUh68OEBfjf4A7/tLt+UCo9p4LdgmiOFAtUPuVDDug9QeHLrEB0myW1ksEJ1vxqf Vv3XyGMQFzWG2rnFfLQcOjqHV2i4GbqPQizRc9KbiBq2BX7F8ePjsgwdcMTNqypG74+f URgaTo531UKCKI5TpbczoEm3NIn8a3F63PvGQAsjrKHtYFXD7KgBRWQ7ibXTdr7PCnn6 XdylmuoTA93aJ2Aw4Ny5lo3+JPQ6aalXl5kdXPmNCSqgfS1a3qqMGoLZwkCmOduTmAX4 yo4A== 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 l13si1031660edb.410.2021.02.22.02.56.23; Mon, 22 Feb 2021 02:56:46 -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 S230316AbhBVKzR (ORCPT + 99 others); Mon, 22 Feb 2021 05:55:17 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:12934 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbhBVKzM (ORCPT ); Mon, 22 Feb 2021 05:55:12 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DkfD25D29zjQ63; Mon, 22 Feb 2021 18:53:06 +0800 (CST) Received: from [10.67.102.197] (10.67.102.197) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.498.0; Mon, 22 Feb 2021 18:54:13 +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> From: Xiaoming Ni Message-ID: <3bc570f6-f8af-b0a2-4d62-13ed4adc1f33@huawei.com> Date: Mon, 22 Feb 2021 18:54:06 +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/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/ Thanks Xiaoming Ni