From patchwork Wed Feb 3 13:45:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 375407 Delivered-To: patch@linaro.org Received: by 2002:a17:906:48d2:0:0:0:0 with SMTP id d18csp417288ejt; Wed, 3 Feb 2021 05:47:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxa1HJG64dM2B0dJEeOgeh6VSy0iJ8MqpIPxkKHZXI0xzoEmrv/FnzbteaXwJDwj2twody0 X-Received: by 2002:a17:907:767c:: with SMTP id kk28mr3199048ejc.98.1612360066248; Wed, 03 Feb 2021 05:47:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612360066; cv=none; d=google.com; s=arc-20160816; b=SwwPoOsbjs9i2VDQsHmtRnmq90FFQe7NORdbgl406zGNAwSm7Crjg0AcQCkUIoAGSt HqSVMCJEV2+e0anJTANU0gNO4gSqajijlYoHosvFNRBn/1Z3O5nsBYhgsratMS2Qx0KK WqT3tvAWG7bKz15MhKXn4zDH+YwlRH/xLY+Uqi+uz/DitBpOLY75D4KflzI2ozAPmVIQ oBayQPzEIe4k0op7Me/Nsc83IGXEzEO6gv7uDJtpR3sKPiuUyKHNdqIpDFKkA7IefHL9 nJMklhae9cs3UubAz4dsJzU9MPkHMaycX22vlLVVlbzTq38o+Lc/diXCIViZDgbqe+Rv 1LEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2Wjtls+pH/GZJVycHEPxwrPZB5Wdwg8gcit7enARmf4=; b=NPjbQtxpdzCzRUrIqH10rL6tOw3zVPdDDgOEr3R33p2lJon+7VUlpgQ40ul10DYEpg 1V8Bjcu8a4A8K01yPM6cWWSW4DYm1GOkTboWcY7linnIwAW+miDWd+D60f5810w35Uar kSK/XQW8DXTq5nVmMRGf6Eog4FOGpcJeh2EBIk58/TbX+4EHry2V/G10dHMk1HAxxXID JhRibhydQ32nigq3+mXFNVFmLnekuFwbuAQ40BGOh5sUMGUCEbSuLbX3DNpyABVrcJHr FvjhGG9ZGmIHqsdC8w7oJnV2rQZijxDLSzXltd/cJmXSWtYAhxL3FxodjqBsVg+lNIur 2DIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f47c4ugf; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 jz24si1404088ejc.430.2021.02.03.05.47.41; Wed, 03 Feb 2021 05:47:46 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=f47c4ugf; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S232161AbhBCNr0 (ORCPT + 13 others); Wed, 3 Feb 2021 08:47:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232193AbhBCNrV (ORCPT ); Wed, 3 Feb 2021 08:47:21 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6A47C061794 for ; Wed, 3 Feb 2021 05:45:57 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id d16so24322919wro.11 for ; Wed, 03 Feb 2021 05:45:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2Wjtls+pH/GZJVycHEPxwrPZB5Wdwg8gcit7enARmf4=; b=f47c4ugfyeITPfmr8BwY4/nuEC3Hx/6feP2Z0MwgBmo5U5B3pGdIFg41B5aR85snq2 ocRFntQd53/bRbPfauI1keRtHKAgiYbyY5JEXuvxQ8ZlUKZMTMf2X4TW+kwAjizqQRCU DnyMk+xjCSyJwf58hiipHsQkzc0OtqRvD1Qo/3NyTtKFyvKijmhV+UDzKGe7cJZkJEpl LdwcpSCF0ui/Dqmuq9e1/ukfbH1zEErI4bSokDnS1WamBaUaqoWPKkFMTFXYdIzBaEvZ B7rBYFtWrbHqQ9s5ZleAcmBTfyGFZMpgWRXlwApV56RVS39Mjv+GwBBcBRroniRAgnrd 0jzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2Wjtls+pH/GZJVycHEPxwrPZB5Wdwg8gcit7enARmf4=; b=ldmlH2FiX6pjx+vX52jlpXEHzlLSF6Yr3Qt9qRl3cJrdpMuvZyaso4zvZ50dpqEtxq oloUqtZPaMFtKdSYrUI6o+LD6nKbbvUui4+nCRGAnrqKGTZsZxA+oxIIFcSUggum3EqQ O3yFRI3f2J6dKrQChVmF1MypfTu23V2F4t2qDE9RZHWW2/S4C83DcOuTem8FdlhmCZPV VKyI/rMQV099LBkmshMF4k4st3V3LWhMA7iQLwlHAXC/KUC/XEmmxreMeyDXeENgL7BZ ORn3gF0iyW8l8rqe65WD7oXMhQ5o/jen8sutOSwRgL+ei7Nqs60X0g8GIbqgfS8ZieEs oQAw== X-Gm-Message-State: AOAM530whqWo/k+EF+RMPT5t79kMHv9rG9QBMUGsr8s84rTdx8P120iK 7457slS8JgY11/qMvp+8BA5rG3i3RhwP2A== X-Received: by 2002:a5d:6a01:: with SMTP id m1mr3544022wru.318.1612359956182; Wed, 03 Feb 2021 05:45:56 -0800 (PST) Received: from dell.default ([91.110.221.188]) by smtp.gmail.com with ESMTPSA id r124sm2867900wmr.16.2021.02.03.05.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 05:45:55 -0800 (PST) From: Lee Jones To: stable@vger.kernel.org Cc: Thomas Gleixner , Peter Zijlstra , Lee Jones Subject: [PATCH 08/10] futex: Use pi_state_update_owner() in put_pi_state() Date: Wed, 3 Feb 2021 13:45:37 +0000 Message-Id: <20210203134539.2583943-9-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210203134539.2583943-1-lee.jones@linaro.org> References: <20210203134539.2583943-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Thomas Gleixner [ Upstream commit 6ccc84f917d33312eb2846bd7b567639f585ad6d ] No point in open coding it. This way it gains the extra sanity checks. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Signed-off-by: Lee Jones --- kernel/futex.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.25.1 diff --git a/kernel/futex.c b/kernel/futex.c index 40b9ba24bd9a0..be5e3e927bffa 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -879,10 +879,7 @@ static void put_pi_state(struct futex_pi_state *pi_state) * and has cleaned up the pi_state already */ if (pi_state->owner) { - raw_spin_lock_irq(&pi_state->owner->pi_lock); - list_del_init(&pi_state->list); - raw_spin_unlock_irq(&pi_state->owner->pi_lock); - + pi_state_update_owner(pi_state, NULL); rt_mutex_proxy_unlock(&pi_state->pi_mutex); }