Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp273933pxb; Thu, 25 Feb 2021 02:03:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+kc5+fQW/RtIImvLhTvMGRY15+CYfyv4i+73IdaVkhNwaj7NdgA1a5GwpoPr6dBn2U0uk X-Received: by 2002:a17:907:3e02:: with SMTP id hp2mr1955387ejc.340.1614247396315; Thu, 25 Feb 2021 02:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614247396; cv=none; d=google.com; s=arc-20160816; b=ewthxocGtFkWyoRK20y5WlyoUoaS57lt/5LTYz9Mo7hIAwYHIhfdsdXzK0q519z3RQ /2UN1TJObiImodDdmq4NLeSY2fG44OPtD4NtNZ5YIBOIyzsvmOFdUV+8bEIEA0Tp2ybd +FA2eTCF16uCngIn7aHV8V3M57VYDbRb59qNA4gToyLWj9z7rQU1rbp7Yqi4WxJj0c71 yHeu1agMN4U9fMnBOzvg7A00iOmPz7SKoyEykFgG/qkNQKML4/pfItiPmLlWbHzdBJMk O2+X/uQiEDfDpIg7nV46D6rFingZhw7TxfjqCp4HBHfKq5P9g7XMOk3B1EB5go5btGCZ 0jUw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jt3f5PSlfrfTzXBF41UxrdtI2y14FBGpZCcDyrQYVAQ=; b=fQv0GJ8GOV7JdLljzuLjj4+vPxNd2ebVddAA5mT6wbUwpELSqHS7AjHkGsFLVjeQ2w quS31OVhw/tHJwrJeu4g+I3cVp0/8Vpare9G2ZzVJJQepthCVorW3O/m7CR1Rwzwx00t X5uaYz2aiB+hYSkfJmYuBhknBwzjzGu549R+4+WBUWTrcdrzQpsZ4QtSvfIzbokQ3cbn 360BQZan5wjxa9yd5AMINkzcuDHzVPu2Cr9sDicM6Adq9qY8VAVU2jK9t+5A2u3An8ua G95NPwoiz9+dbV9f+qUFX2hNryX5BQcvJDTavNvooK40Nq5XJKMlmzlw1h4kVQ9i88/m G2BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IJpfGrK7; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw12si3298443ejc.729.2021.02.25.02.02.54; Thu, 25 Feb 2021 02:03:16 -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=@linaro.org header.s=google header.b=IJpfGrK7; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236494AbhBYJcx (ORCPT + 99 others); Thu, 25 Feb 2021 04:32:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236398AbhBYJcE (ORCPT ); Thu, 25 Feb 2021 04:32:04 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEFE9C061574 for ; Thu, 25 Feb 2021 01:31:23 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id i7so4597612wmb.0 for ; Thu, 25 Feb 2021 01:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=jt3f5PSlfrfTzXBF41UxrdtI2y14FBGpZCcDyrQYVAQ=; b=IJpfGrK76fzW8EuyG7kHKBBEOgSacm7oP/+ohWVEy/DRpR9XmJ7DztCKbGz3bs16j/ LmzE4BneSaQhfntz+XQDv7xuEpRB/ocVUFeSUr1HcqVrxHDztSzLBFQJ9STxV8fXojwP sZlEfAyJWr50BFmOjPfoUkzSvqWyqvdiZiq6hiU8cpxcUW8jUVY6LjEaUvO9z/pBalUS FwOw9pnemFoEwJ8cp0nBAo9NAZMAZyNmtcj5OCV88S2LogMA4u89tT838zhsWBKT1prW PwRj8pkmw63oC9LvMrSBcarmN+oQBZ7AOeuLuoriwoTc7RT/VmcxqKOqag6F54oi7+iA MHMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=jt3f5PSlfrfTzXBF41UxrdtI2y14FBGpZCcDyrQYVAQ=; b=fBvdBTq94cMgTTaO4QEQMBtVgJoVPrircaHrKCc5OfAoU7VTUz7+VWWmH3wZl8pjAL SrbQZ1peMuLzYWVmBtzPcIaTVvY5p1AhNuPcaVoqNTGGcOGvnQ0mLHF0HvjIeZJPzacY BNchj297ra8jd9gsSbnibKw37wFjLIM8zyJr6w2a/lUFDm30gFx+zX6MezKDKDD6vPDg mFwbUcTXAHOxh8qLBIFgMzwab4Jeqi/s1CbJv1uCSrw3oV61S/Kswjb56RwmIXxtxbft 6MW0BfeAMg0Ehl6LS97DSysSU2qEqFDNc7Xp84cChlp7BfKAIF2bV4PI3Ckx34iKMi+Y CMZQ== X-Gm-Message-State: AOAM533Vav7+81HCtzJi+3K0dHxoOLPsPi+zn+1TXzAqbExKy9WH1p2d 44cogunHxlKnBonY2RXRu6XPkoqd4Zgx9A== X-Received: by 2002:a1c:a7d3:: with SMTP id q202mr2290120wme.93.1614245482639; Thu, 25 Feb 2021 01:31:22 -0800 (PST) Received: from dell ([91.110.221.155]) by smtp.gmail.com with ESMTPSA id w13sm7724031wrt.49.2021.02.25.01.31.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 01:31:22 -0800 (PST) Date: Thu, 25 Feb 2021 09:31:20 +0000 From: Lee Jones To: Xiaoming Ni Cc: Greg KH , linux-kernel@vger.kernel.org, stable@vger.kernel.org, sashal@kernel.org, tglx@linutronix.de, wangle6@huawei.com, zhengyejian1@huawei.com Subject: Re: [PATCH] futex: fix dead code in attach_to_pi_owner() Message-ID: <20210225093120.GD641347@dell> References: <20210222125352.110124-1-nixiaoming@huawei.com> <71a24b9b-2a65-57a1-55bb-95f7ec3287dd@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <71a24b9b-2a65-57a1-55bb-95f7ec3287dd@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Feb 2021, Xiaoming Ni wrote: > 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/ Replied to the follow-up. > 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 -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog