Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp984305rdb; Fri, 2 Feb 2024 09:43:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9ZRofnaZaw+/Z5/iqcZShwG7q5C9y5WN6CSr0SPTvyaHcc2jKUU6njDXNz7JJtxTnXPW5 X-Received: by 2002:a17:90a:2c85:b0:294:a53:4418 with SMTP id n5-20020a17090a2c8500b002940a534418mr8935281pjd.2.1706895831523; Fri, 02 Feb 2024 09:43:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706895831; cv=pass; d=google.com; s=arc-20160816; b=tDEiUynoVRdGa07W+MMXB9fy08zY1VUygYw8S4xCiZYOtEaDBLEtsqcyzYna2tRbEW I7HPLYqTQxrsRwRnAclrj7RLkXP+op9BAQ2anl7t5y/peoOKBBngDMjjpH5PrWKfc6+2 d9KfVeYXeWqiWqzketuSct6FSfioEo/731r377jC3NBRGDFJaoIGmEg5luU05URH3yj8 IB/4Rduo4+trF8h1qaPSm4NAROl0IanRQJMHxwekxcsUgBNr8j08nSUgGB+FIWyklJga eEIlnb369p48ED1GJaAVJmnsTXJH5iE+qkKSQpHusl/z/X3ePn4YLr2b0nhoN8HfDEba 2N9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6xv0ghtBWKci3ltFD1w38GyDNGgkmxE+GwKbqBNa0b4=; fh=/oocPAYYgixcg8BsBpBa4NDC8Eu/+kqAwyLrZxAj3s4=; b=ujTA76fRrsisYddbO3UzOCFvqlGkyklrX8tjLJXKO580Z7rlfkRlDiygo3m2gkiL/A x8A+5u97Z7ucBy0SVYFRR98stt1WIdRI4J8uCpJPH/BTrFks/Dq7jkxSvC0XLby2W3ND 0bSUZTIJRqQasy6HyJ/sfq61/cYvb92xMY5tn9P9pzZzZsb9JUrz2rmyXN+aQYXnfRk0 28rDFj8vFvkd1JthbOSENL6g33kl/im23b/OQELggr+bJM82V9bCXOTACKtJfeGI7AZQ wcU20GlFSEgkWstPbMYK4juCfqP6YBuQsoJPpyIShkXax5Olg16rPw3Dntj7lc9IbXAY Qtng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@monom.org header.s=dkim header.b=Fs4qqqnl; arc=pass (i=1 spf=pass spfdomain=monom.org dkim=pass dkdomain=monom.org dmarc=pass fromdomain=monom.org); spf=pass (google.com: domain of linux-kernel+bounces-50218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=monom.org X-Forwarded-Encrypted: i=1; AJvYcCXzAt3bHlyaquoQvmXyMlRoLsvNGrmdC5gPbyO4Fv4OZswsF2FOTuEA1VK8I/JPx9zeebmE/rsaQocwM+tEoDP1U+0ZuQpBqhsLZ4DjSQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id cm8-20020a17090afa0800b00296595d56c6si250589pjb.130.2024.02.02.09.43.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 09:43:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@monom.org header.s=dkim header.b=Fs4qqqnl; arc=pass (i=1 spf=pass spfdomain=monom.org dkim=pass dkdomain=monom.org dmarc=pass fromdomain=monom.org); spf=pass (google.com: domain of linux-kernel+bounces-50218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=monom.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1F2B8B2DF9A for ; Fri, 2 Feb 2024 17:12:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B18A914A4F8; Fri, 2 Feb 2024 17:11:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=monom.org header.i=@monom.org header.b="Fs4qqqnl" Received: from mail.nearlyone.de (mail.nearlyone.de [49.12.199.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F2DD5FEE6; Fri, 2 Feb 2024 17:11:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=49.12.199.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706893907; cv=none; b=qpIkfHBkyyeFZeRWpten5AFapGx4W8EN3RIv1VGZ2kP3Rfe8ECizy/x0ALMMdqezMcNRgC38CwLLDzGw0Dq7FVYwKw4+anZsGf8c1ObQWCtj0L9Lu32XwJNEyVBFzkQe0huOqYv/4363fCwFX8bD5DLZPcmZpISDVPC5VgV1jXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706893907; c=relaxed/simple; bh=p/cssrwWO4JA+lysWQPVqrAGJ0msE/E/7wO3Tnhk2l4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fwCqmD0ElhEf3RBmG0iWsin2bArCHxQBkv30wy0CPNB+RytFE2Hmp5RbtiuSl18Di3L1jly+iA7KOOufh+fR6S8TH3XU19m9CyWs8PTAwMEehCndAsDPH+LyRgl8sxs4LbiyhMA/xh7IKKXWP3Rd75Y30BYwG+m6JYV0uK+6aiw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=monom.org; spf=pass smtp.mailfrom=monom.org; dkim=pass (2048-bit key) header.d=monom.org header.i=@monom.org header.b=Fs4qqqnl; arc=none smtp.client-ip=49.12.199.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=monom.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=monom.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 530A1DAE38; Fri, 2 Feb 2024 18:05:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monom.org; s=dkim; t=1706893504; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=6xv0ghtBWKci3ltFD1w38GyDNGgkmxE+GwKbqBNa0b4=; b=Fs4qqqnlwdzstMLeQMich9y4y19YmkMxpUMCLUV3S4+yi/GsqqSRfuNvsdyvJxi/TA0yGX 63LxpEl8JTRHqLYqvJ5KBD0LfgLUYfBr2Rb1Oe/9OLjAW4msbxdEMS7j0a3d5M3f8GfvUO s8XcLGoJW3V5iexXOyhh91tsg9jUC/6Jc9LHVAHU8vM7jR3c9iUi6gF6uZBkLeZaxZAR54 Wq0ZyEJa5YxhoGlC0dvisjmNLzMtJdmbrZIyDqKoFyaCozbKXx3eLwVvYWnQ2XKLEf+uUw x4zieMty50pirlKTav4T27EQ8PzttNMmBdpp2wXX+ffs/eFwP+o+Irj1Wzm/Eg== From: Daniel Wagner To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, stable-rt@vger.kernel.org, Steven Rostedt , Thomas Gleixner , Tom Zanussi , Clark Williams , Daniel Wagner Subject: [PATCH] Revert "crypto: scompress - serialize RT percpu scratch buffer access with a local lock" Date: Fri, 2 Feb 2024 18:04:57 +0100 Message-ID: <20240202170457.29516-2-wagi@monom.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240202170457.29516-1-wagi@monom.org> References: <20240202170457.29516-1-wagi@monom.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 This reverts commit 0cb152421350004d4dcf3a4523d88c002d0a7973. The stable backport f8f261f9ade2 ("crypto: scompress - Use per-CPU struct instead multiple variables") replaces this downstream workaround. Signed-off-by: Daniel Wagner --- crypto/scompress.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crypto/scompress.c b/crypto/scompress.c index c2f0077e0801..968bbcf65c94 100644 --- a/crypto/scompress.c +++ b/crypto/scompress.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,6 @@ static void * __percpu *scomp_src_scratches; static void * __percpu *scomp_dst_scratches; static int scomp_scratch_users; static DEFINE_MUTEX(scomp_lock); -static DEFINE_LOCAL_IRQ_LOCK(scomp_scratches_lock); #ifdef CONFIG_NET static int crypto_scomp_report(struct sk_buff *skb, struct crypto_alg *alg) @@ -148,7 +146,7 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir) void **tfm_ctx = acomp_tfm_ctx(tfm); struct crypto_scomp *scomp = *tfm_ctx; void **ctx = acomp_request_ctx(req); - const int cpu = local_lock_cpu(scomp_scratches_lock); + const int cpu = get_cpu(); u8 *scratch_src = *per_cpu_ptr(scomp_src_scratches, cpu); u8 *scratch_dst = *per_cpu_ptr(scomp_dst_scratches, cpu); int ret; @@ -183,7 +181,7 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir) 1); } out: - local_unlock_cpu(scomp_scratches_lock); + put_cpu(); return ret; } -- 2.43.0