Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3028738pxf; Sun, 14 Mar 2021 22:10:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRt4viQQzDDycJ9HiQd00dZ0juDeBnbICvvnivCPWfuoKtNB9VYJppN1ts+DQYSldgF0NY X-Received: by 2002:a05:6402:1a3c:: with SMTP id be28mr28022940edb.125.1615785003826; Sun, 14 Mar 2021 22:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615785003; cv=none; d=google.com; s=arc-20160816; b=FUAVCrW0P+fOKRabpAAtNoMcv8Z/jTOFeC8gfif54M1YWRpNJYV+bOHhgPCK648ycI JK/e4H/SXkDN7soJNgESKGoOO3TDU8DjdzmVk/dLwr9+rCmHBq1863iIbtt2au8dHRvS b//zxRYGnLkiwXftd6XYRUn+RJnW686R1EFx4ToYghZMvf1dMfgJI3JusEC7fG9ebcia Bzi3VbnN5Pi81rEmLq+/FHIzEjC72k3XWniQepLsI61Db/RM2gCC7+StcpeggtWcWIZM dFnfzf/QdRfLwyn6dhZREc3NNs2WYf/qS7t9FNEXyDY6Nsvs5WajM4YXWq3PD0nxhuik MWng== 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; bh=U+h0wLp0vY97M+C67qKzyAmKFdV45gAiT5ANsPkWzJA=; b=WIHULr/TVo7oHFpGhM9ubl3VWvDoaQ3ztHOV3Ywb60YdM3sGrnoqO4Y17VWPtm2aOn tm+XWU5ENsEPAt+TxB1aEdVsVG/PqHAerUIeSmA8Ex+8hiBqrrOmpYF8gRKnjRYLVR29 7lvehV+4nDSuokIvVQWvjRZ0jneCvrnD5V/2jioFhR2syCNIauG5zgTj7cf8izQ54cVG EDoG3pXsIJO9pzig2DbYzKbKqa/muFPw6rJSgHW5fF1/kNnUFwPY7p+KY+9j/IAHTRDC QJdNkTxaEXgBjiYeH9o9+ZCG6e3+ObEEw2tosdAJVaqlJhTi1fXJJqEyM5UdB01voRIp aURg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb15si10880693ejb.147.2021.03.14.22.09.41; Sun, 14 Mar 2021 22:10:03 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229899AbhCOFDR (ORCPT + 99 others); Mon, 15 Mar 2021 01:03:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:59752 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229851AbhCOFCw (ORCPT ); Mon, 15 Mar 2021 01:02:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 09B6EAD74; Mon, 15 Mar 2021 05:02:51 +0000 (UTC) From: Davidlohr Bueso To: tglx@linutronix.de, mingo@redhat.com Cc: peterz@infradead.org, dvhart@infradead.org, linux-kernel@vger.kernel.org, dave@stgolabs.net, Davidlohr Bueso Subject: [PATCH 1/2] futex: Fix irq mismatch in exit_pi_state_list() Date: Sun, 14 Mar 2021 22:02:23 -0700 Message-Id: <20210315050224.107056-2-dave@stgolabs.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210315050224.107056-1-dave@stgolabs.net> References: <20210315050224.107056-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pi_mutex->wait_lock is irq safe and needs to enable local interrupts upon unlocking, matching it's corresponding raw_spin_lock_irq(). Fixes: c74aef2d06a9f (futex: Fix pi_state->owner serialization) Signed-off-by: Davidlohr Bueso --- kernel/futex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/futex.c b/kernel/futex.c index 475055715371..ded7af2ba87f 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -885,7 +885,7 @@ static void exit_pi_state_list(struct task_struct *curr) */ if (head->next != next) { /* retain curr->pi_lock for the loop invariant */ - raw_spin_unlock(&pi_state->pi_mutex.wait_lock); + raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); spin_unlock(&hb->lock); put_pi_state(pi_state); continue; -- 2.26.2