Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp270711pxb; Thu, 25 Feb 2021 01:57:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyH7+rIStZRUJfwISuilEUn14mtaIm0YtJyZYKx1pCSdx7x+dp7Shkp6Td8xwT9jvyJYVrq X-Received: by 2002:a05:6402:1152:: with SMTP id g18mr2114840edw.18.1614247033166; Thu, 25 Feb 2021 01:57:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614247033; cv=none; d=google.com; s=arc-20160816; b=Q5GHBT9lXXdWYqcS1fhLRt1pp/mbRWxsF7DQY99RFz+SEPFLmi2ri5qcS+KVknlHfX D0vBX+tyxT5grr+iLl82ZlQyVu18NKry/SeggbN6ldhofl9bxmoa8Cr2qmQrxBht6HR/ 3YWvc9GL6HhGSWUqUBqQGVTxijKqXjB0ufk5RL0lvm8NKj0N1UkE7pe+ynXkquN6zsLq okgi4kco44kYbBkcDOl4d1vwQOGnFkR/eb69zpVIJv8no5jiOI0nIIJ6bLNIUtrIqMRR 9L0S9dWxYQxghLRf1DcJ/MJdw43UpMHSUj2+ARyq2gKjGVRe+mUz5sRSP1TYIj8PZCcH cVjg== 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=kZ80xC14KVfvLTR5bdlJpdr5IRckWb7Uao7I7IVwIqw=; b=L1IUFHX4zTiMdjI5yNNPcpMvMLSfLNZ7ykSgheNSl4qfHSuH+zzw/2lIctL1sDIoyE u4wARuYt79YXGyW7Ga22wCDuX9XUN0QqaoleiH/bdX5WS+OOmn40pWraRn90We+mlAQG 2ZVYwdhg9IqUhiNbiMjuRW0+0mYf/LooSEkWkGGZMYIvxvLgSvr0CijeEzerl0fMzz37 Ld3eMyYK78DpDxoarwjPY7QDYT/r3oDsmnMWjCbvqVH8cdaD4Ldepz1OO5J7uNeuTbgg UCJY82IzjnJHbvR+csSkNXx86s2sm3L6fCIvcTsxsd28jEkN/NZWR/ckIfNTsXYaNlDj D5FA== 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 n21si2951432ejb.90.2021.02.25.01.56.50; Thu, 25 Feb 2021 01:57:13 -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 S232495AbhBYI5E (ORCPT + 99 others); Thu, 25 Feb 2021 03:57:04 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:13002 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbhBYI5B (ORCPT ); Thu, 25 Feb 2021 03:57:01 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DmRS11HS5zjSGf; Thu, 25 Feb 2021 16:54:41 +0800 (CST) Received: from [10.67.102.197] (10.67.102.197) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Thu, 25 Feb 2021 16:56:11 +0800 Subject: Re: [PATCH] futex: fix dead code in attach_to_pi_owner() To: Greg KH CC: , , , , , , References: <20210222125352.110124-1-nixiaoming@huawei.com> From: Xiaoming Ni Message-ID: <71a24b9b-2a65-57a1-55bb-95f7ec3287dd@huawei.com> Date: Thu, 25 Feb 2021 16:56:10 +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/25 16:25, Greg KH wrote: > On Mon, Feb 22, 2021 at 08:53:52PM +0800, Xiaoming Ni wrote: >> From: Thomas Gleixner >> >> The handle_exit_race() function is defined in commit c158b461306df82 >> ("futex: Cure exit race"), which never returns -EBUSY. This results >> in a small piece of dead code in the attach_to_pi_owner() function: >> >> int ret = handle_exit_race(uaddr, uval, p); /* Never return -EBUSY */ >> ... >> if (ret == -EBUSY) >> *exiting = p; /* dead code */ >> >> The return value -EBUSY is added to handle_exit_race() in upsteam >> commit ac31c7ff8624409 ("futex: Provide distinct return value when >> owner is exiting"). This commit was incorporated into v4.9.255, before >> the function handle_exit_race() was introduced, whitout Modify >> handle_exit_race(). >> >> To fix dead code, extract the change of handle_exit_race() from >> commit ac31c7ff8624409 ("futex: Provide distinct return value when owner >> is exiting"), re-incorporated. mainline: ac31c7ff8624 futex: Provide distinct return value when owner is exiting >> >> Fixes: c158b461306df82 ("futex: Cure exit race") stable linux-4.9.y 9c3f39860367 futex: Cure exit race c27f392040e2 futex: Provide distinct return value when owner is exiting >> Cc: stable@vger.kernel.org # 4.9.258-rc1 >> Signed-off-by: Xiaoming Ni >> --- >> kernel/futex.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) > > What is the git commit id of this patch in Linus's tree? > > Also, what kernel tree(s) is this supposed to go to? > > thanks, > > greg k-h > . > Sorry, the commit id c158b461306df82 in the patch does not exist in the linux-stable repository. The commit ID is from linux-stable-rc. I corrected the commit id in a subsequent email, and added a branch label. https://lore.kernel.org/lkml/20210224100923.51315-1-nixiaoming@huawei.com/ Sorry, I forgot to use "--in-reply-to=" when I sent the update patch. This issue occurs only in the linux-4.9.y branch v4.9.258 Thanks xiaoming Ni