Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp186906pxf; Wed, 10 Mar 2021 04:03:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFQDF0t9L3/HR8cF8S8uVIBHWQZwYgefyhRaEoi3X0VOrynIDj6bh24zOjGR4anNX4d92f X-Received: by 2002:a17:906:1453:: with SMTP id q19mr2590775ejc.76.1615377784714; Wed, 10 Mar 2021 04:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615377784; cv=none; d=google.com; s=arc-20160816; b=DGFTBFz+j+NcwmdH07vpwlXw78yBffg5r+3iDuahlpOqZTqA5Nd1Cc92YVAYQU/Q1w 4/YzJtgWS6EW6PlvI7HAUtQkuKW7y7ayqEYsh1wkxAQ7j9WdnkaX3eCn2afzwpSzGNu8 EDRb1A6yTWQRSAvMipXQx/xQiaJcdICfg8oYbNeI6NxUb5KlwuNQFubw4PTqTp/e+gH+ +uyum7tNKDyWcIevE4F1g56tD9ohlIUOG2L/pnMP/AH9O6hlrGCCMkWR0dAL7I8k2QqK j+DJ20OpGVUT8L5hRZ6W6sgiza3vuQrHteNFVWB30OswJiW0VAfo6myyDdx8zsMipmxj BckA== 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=UAB3VCHNq0lWyDcWNVjsNA1bIeN/ICcx0yWOovvv45Y=; b=pbihEIrsp7Fd65ev6/9tEjm0U9Wna5JloDnmMhsvHP7058yH0OmINrPhvhR/Byqtkp MPNxVamsYp04rXJdDRKUOfN226lO7yPK7e59bkz+RThd6Wgyb1qTZIkx3JwVUNMMBfXz PdexuNZMDp5MAL+U/vv4Dsu4WwgXO6REXLBQdZLeB1AaTsYkJUDBas77/CqodIezraZF NV5S0c+cAd4sx8MZrqKt+sAOUfCvvKdUN9GxvaB1y1td3fr2AaDsAE92ek7xmpW1EHpc B8OgZuhj87LtbaIZHN/VBK8cn3addtz/YWoMyAzcETKGlkpiQ55TKJSiSEioToxuMW+6 ddNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WLHZmWrA; 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 jt20si11621679ejb.157.2021.03.10.04.02.34; Wed, 10 Mar 2021 04:03:04 -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=WLHZmWrA; 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 S231356AbhCJMBF (ORCPT + 99 others); Wed, 10 Mar 2021 07:01:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:57750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbhCJMAv (ORCPT ); Wed, 10 Mar 2021 07:00:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD19D64FC8; Wed, 10 Mar 2021 12:00:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615377651; bh=AGuMI85YbWqj55al8PdjTh6DWfYDTr6uOIwqaWAcErE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WLHZmWrARw0ecwJuGJACvT0jW5JWKhyg0d+Mb4BFVbHqpDrpSmaIIivF55LGMF/jb sjpQZeqvlZQu3JtQCn0BgyM5GeVIZCHVGduh2AFdWV2TH8CpPklD95PDwwUj3wFXQW Pcoia6UEGFZHjRIR2IEX8H1IMdHuFZwaadpki6UY= Date: Wed, 10 Mar 2021 13:00:48 +0100 From: Greg KH To: Lee Jones Cc: Zheng Yejian , 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> <20210309181437.GV4931@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210309181437.GV4931@dell> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 09, 2021 at 06:14:37PM +0000, Lee Jones wrote: > On Tue, 09 Mar 2021, Greg KH wrote: > > > 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? > > It doesn't have one as such - it's a part-patch: > > > > This commit takes the remaining functional snippet of: > > > > > > ac31c7ff8624409 ("futex: Provide distinct return value when owner is exiting") That wasn't obvious :( Is this a backport of another patch in the stable tree somewhere? confused, greg k-h