Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2445166pxb; Tue, 9 Mar 2021 02:42:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJx88Xg2MeOiN5wUBPTzZbOW8XsMOCMVxyRmbWYLCyJnoctIRazXsY5/PGuFpPx4oUlR6gba X-Received: by 2002:a17:906:1e4f:: with SMTP id i15mr19185791ejj.349.1615286566345; Tue, 09 Mar 2021 02:42:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615286566; cv=none; d=google.com; s=arc-20160816; b=SAT6U6eK8MzoMX5aQwagkwKG5rSJWEWj6V0SrbCF310csu+2HF8LYInEL67VPxoVu4 F1qcad4HLJm8+6MMVPbWyuvk/gmJx0OFujj2qr3xjHmeU7S1zo/0msea7hNoFOiLe14F +hrJzNwyMT4mpxgOT9bjVgtyOIsgwZnr5Ongp7ZMfA1J786I7j1VHZKJkXODzCd0jVuO 9A+UdlSkYHxQkGUxQFZz8U/AlS8Dlu8SNmxHEZnxO1qb7gf9CagS93QGlmAy02hvR+bm aILl//a0IH8XSfMH34xHGf6gzXvw+cwTFFRNdX1CmjiSRKZoltqdqf+mGPDnlZTU34G8 v4Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OcC/yh7uUD05MmESqy3HnOYJ2F8qLSKtEOOfbY5eZkA=; b=WHJ9aWOmdw/mbuVNpuLoJZAPhHxEOFqh4urXzIR3JkxL+S+ag8P9DNSi6dd/aU1Yyg M5kzZZwy1mmXwAXRaWJm2ylyME9bz2qZYWQxAIoedTdhrazhrDiyWjYxs3qFJBSQHKvC jExreXFL3T1SSROX/oEe3TWJFEDT+dluK/GnWg+Q/QpdXCPk9JZKIKOj5ZHJD5si91xQ I9TnqLVHEsFO3HauYN3Ak5FG9zbRQWmC/4yjWaJYvPlpVrnFwbP9R5+s2S6VnoKlaTXv sAKm55R/N7QRmmYoE1W61KLdnV8YLOuws/jl5Ei1NAXKBQuseH9G1ZDABfL5Ta4rgSKI pRQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LodaY9wE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si8343353edb.526.2021.03.09.02.42.23; Tue, 09 Mar 2021 02:42: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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LodaY9wE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbhCIKk7 (ORCPT + 99 others); Tue, 9 Mar 2021 05:40:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:43446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbhCIKkh (ORCPT ); Tue, 9 Mar 2021 05:40:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9F27064F20; Tue, 9 Mar 2021 10:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615286437; bh=3R5HvtVi1J70GH7Qvafo0Ks+eXVAWBIe2VY2Hlhvc+0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LodaY9wEPX55S74TfW/T/a0YFwGfvIJGCtDRt7Nq0fxNg6+RkfdcVAIGrnnpqiFgC LJ9q5JSH0jIDrxutp6W7zX+Ddry4NfiMtJcuWN5ag3cHC58iJUe5WIN5MPuNjFdOsL UE+JR195QkC+htswvab/F+ae6oy8MeIl6o124DjA= Date: Tue, 9 Mar 2021 11:40:35 +0100 From: Greg KH To: Zheng Yejian Cc: lee.jones@linaro.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, cj.chengjian@huawei.com, judy.chenhui@huawei.com, zhangjinhao2@huawei.com, nixiaoming@huawei.com Subject: Re: [PATCH 4.4 3/3] futex: fix dead code in attach_to_pi_owner() Message-ID: References: <20210309030605.3295183-1-zhengyejian1@huawei.com> <20210309030605.3295183-4-zhengyejian1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210309030605.3295183-4-zhengyejian1@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 09, 2021 at 11:06:05AM +0800, Zheng Yejian wrote: > From: Thomas Gleixner > > The handle_exit_race() function is defined in commit 9c3f39860367 > ("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. > > Lee writes: > > This commit takes the remaining functional snippet of: > > ac31c7ff8624409 ("futex: Provide distinct return value when owner is exiting") > > ... and is the correct fix for this issue. > > Fixes: 9c3f39860367 ("futex: Cure exit race") > Cc: stable@vger.kernel.org # v4.9.258 > Signed-off-by: Xiaoming Ni > Reviewed-by: Lee Jones > Signed-off-by: Greg Kroah-Hartman > Signed-off-by: Zheng Yejian > --- > kernel/futex.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Same here, what is the upstream git id? thanks, greg k-h