Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp269270pxb; Thu, 25 Feb 2021 01:54:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJy+x1UpDfI/c4cpo+YePUbcrJeSm1NCt+yczpHEQUzZqjQVMpvWZHf/C31meYqJJ7DEM55+ X-Received: by 2002:a17:906:5044:: with SMTP id e4mr1843257ejk.445.1614246848637; Thu, 25 Feb 2021 01:54:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614246848; cv=none; d=google.com; s=arc-20160816; b=O0toGCOvh/0U4xkf1RL7x1bCsNpvMXrIBhFQpa+OicltNjuWPFdcMliL1hr4cohI5A FCw3663YkJ/LxTAzkTAlVaG6nvI39oyo9BCA7K37yrwhT2sujKh76ojmDd4pLqGZWiQr vKzfRpsu6KaidPey7MTM+w1YpNf88QYdS49XQSc0xaATduuM5WxSt+VfKmoU6As0AaFR IKkA/0QUMqDTRsANLL4G5ki24PQY/Mwmx+bLAW5TCGk5jEeVWITPlTOS4YpovIdEhH9N byAZUUlL97cM+xAFFzDJ4Bpe682jOEkdKNYhcA7jhQZDcLEAD58Vux9pc2IgnbLKqvMg zS1w== 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=RiN2cMKC+xppmO732DXmQGbrhZydASnzlrEnedGOXzk=; b=nBIUpndBb/2rV6LqaPAMDQw/kvUNgf6/1iBYRmL2ZJ/tWcP/vJpzfHzlZ9QUzZzZL0 C8bJ5EAjmW5PXd9DOTChFjoCDRqVyL8MTS7oAkRkS7o5ADWdm4H7lLX/QqSnmsgUeonw uqamzHlClmuJW01CbJyFwBcCtgBIF3X1sp6KWlmsvLbjN+5+y6XbyS3J3+0yEyKbKevc /bx9rXsDY/hwFfMB73odB7lJ/O6qAsg9woWn+lknh/WhpmIr+CEqIcWN+qCn43YW2Ojm +0wSObL/DVUG0pTT/Th8zLzRG5SOEssGu7/jW9nBI8N/YA2fpI+aiUIaCBjJDBfacxvK je5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uz8UY5WA; 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 z3si1102620edc.20.2021.02.25.01.53.45; Thu, 25 Feb 2021 01:54:08 -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=uz8UY5WA; 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 S233956AbhBYIKd (ORCPT + 99 others); Thu, 25 Feb 2021 03:10:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235560AbhBYIKP (ORCPT ); Thu, 25 Feb 2021 03:10:15 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05DCAC06178A for ; Thu, 25 Feb 2021 00:09:34 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id l12so4296582wry.2 for ; Thu, 25 Feb 2021 00:09:34 -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=RiN2cMKC+xppmO732DXmQGbrhZydASnzlrEnedGOXzk=; b=uz8UY5WABQ1HPTdrd0DwD7/+9T18JDPE2qP3nlNToxyH4/CNdzlBOcl2wcOiAm2xl+ kZN1T1vKaXZm3l47Y281/BtBFbFvYHfZgkHvWkoTJFjK5B/dsvzaAgPnYXdKxbVXGt5D nNMu5mbuhLBdgGYoGJDIAbe3UxU46BXq061ppegxYHvA5n3/KrnR9HgL47p1FZkruNdA ZlNTKkeR1qgn81R10e1GLC76t8bx34rJJ0AtimZWYl7N9iogYF7cxwva0VxGFdY0tasd LiqiVcjGrjcnXYZXKVO72rCdrjgzXZvpTHGxuJO6eI1TjEdk/F5kI+gkcZt0Sr6ezEEc D59w== 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=RiN2cMKC+xppmO732DXmQGbrhZydASnzlrEnedGOXzk=; b=MFLagUvOu1cya7S8wdFDp4ZI4pmV3xRYNFLgUNhpThk3JgcpEWkvTOQZpl4CiylGoX dxvbuukBMQw6u4DI0eQ04uPlGCgUasTmeW5KwPVDnT4weU9fYyBtnzNJhAPmSbooNcqw Eeyg0GlxgoNiQA7lnJnVsVuf/Kss2sZeo7t3rGdzI8/rjn6yVXJHLlOLKRd7GxKThL68 jTpvp2xoUF6TS+VaHL+Dh74k9a9uQ69Dw8LFFSoElVRnZEW1bfgwEdzm2iNXDWv1sMAT +NrIv4aV9cJVf7J7x5rfUQvDbe+iOfGaXNKOIQFYcY87ZEmeOhwOZ8UYDZbubtvGvIol KseA== X-Gm-Message-State: AOAM532xqpuQxh1vN9lDdczDD37FHHb8cjfb/HY2H1HLE26wkqQ1vdWi BNylSqkIUH6o3F4yGOTPbxFMVw== X-Received: by 2002:a05:6000:89:: with SMTP id m9mr2113738wrx.3.1614240573667; Thu, 25 Feb 2021 00:09:33 -0800 (PST) Received: from dell ([91.110.221.155]) by smtp.gmail.com with ESMTPSA id h17sm6676991wrt.74.2021.02.25.00.09.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 00:09:32 -0800 (PST) Date: Thu, 25 Feb 2021 08:09:30 +0000 From: Lee Jones To: "Zhengyejian (Zetta)" Cc: gregkh@linuxfoundation.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, cj.chengjian@huawei.com, judy.chenhui@huawei.com, zhangjinhao2@huawei.com Subject: Re: [PATCH 4.9.y 1/1] futex: Fix OWNER_DEAD fixup Message-ID: <20210225080930.GB641347@dell> References: <20210223144151.916675-1-zhengyejian1@huawei.com> <20210223144151.916675-2-zhengyejian1@huawei.com> <20210224111915.GA641347@dell> <09cd79ce-291a-1750-6954-ecde0a6bdfcf@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <09cd79ce-291a-1750-6954-ecde0a6bdfcf@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Feb 2021, Zhengyejian (Zetta) wrote: > > > On 2021/2/24 19:19, Lee Jones wrote: > > On Tue, 23 Feb 2021, Zheng Yejian wrote: > > > > > From: Peter Zijlstra > > > > > > commit a97cb0e7b3f4c6297fd857055ae8e895f402f501 upstream. > > > > > > Both Geert and DaveJ reported that the recent futex commit: > > > > > > c1e2f0eaf015 ("futex: Avoid violating the 10th rule of futex") > > > > > > introduced a problem with setting OWNER_DEAD. We set the bit on an > > > uninitialized variable and then entirely optimize it away as a > > > dead-store. > > > > > > Move the setting of the bit to where it is more useful. > > > > > > Reported-by: Geert Uytterhoeven > > > Reported-by: Dave Jones > > > Signed-off-by: Peter Zijlstra (Intel) > > > Cc: Andrew Morton > > > Cc: Linus Torvalds > > > Cc: Paul E. McKenney > > > Cc: Peter Zijlstra > > > Cc: Thomas Gleixner > > > Fixes: c1e2f0eaf015 ("futex: Avoid violating the 10th rule of futex") > > > Link: http://lkml.kernel.org/r/20180122103947.GD2228@hirez.programming.kicks-ass.net > > > Signed-off-by: Ingo Molnar > > > Signed-off-by: Zheng Yejian > > > > Why have you dropped my Reviewed-by? > > > Really sorry. I thought that a changed patchset needs another review. > Then I do need to append your Reviewed-by and send a "V2" patchset, Do I? No need. I won't hold up merging just for that. Just bear in mind that you should apply and carry forward *-by tags unless there have been significant/functional changes. Reviewed-by: Lee Jones > > > --- > > > kernel/futex.c | 6 +++--- > > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > > > diff --git a/kernel/futex.c b/kernel/futex.c > > > index b65dbb5d60bb..604d1cb9839d 100644 > > > --- a/kernel/futex.c > > > +++ b/kernel/futex.c > > > @@ -2424,9 +2424,6 @@ static int __fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, > > > int err = 0; > > > oldowner = pi_state->owner; > > > - /* Owner died? */ > > > - if (!pi_state->owner) > > > - newtid |= FUTEX_OWNER_DIED; > > > /* > > > * We are here because either: > > > @@ -2484,6 +2481,9 @@ static int __fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, > > > } > > > newtid = task_pid_vnr(newowner) | FUTEX_WAITERS; > > > + /* Owner died? */ > > > + if (!pi_state->owner) > > > + newtid |= FUTEX_OWNER_DIED; > > > if (get_futex_value_locked(&uval, uaddr)) > > > goto handle_fault; > > -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog