mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Jordan <daniel.m.jordan@oracle.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	Eric Biggers <ebiggers@kernel.org>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	Daniel Jordan <daniel.m.jordan@oracle.com>
Subject: [PATCH] padata: Replace bottom-half spinlock variants
Date: Fri, 17 Jul 2026 16:50:28 -0400	[thread overview]
Message-ID: <20260717205028.63847-1-daniel.m.jordan@oracle.com> (raw)

Padata no longer runs in softirq context, so normal non-bottom-half
spinlock calls will suffice.

Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
---

Based on latest upstream plus Eric's four padata changes from
    https://lore.kernel.org/linux-crypto/20260713223234.24812-1-ebiggers@kernel.org/
    https://lore.kernel.org/all/20260717171831.27994-1-ebiggers@kernel.org/

 kernel/padata.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/padata.c b/kernel/padata.c
index a28fe0c4f66b5..1d095986add28 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -75,7 +75,7 @@ static int __init padata_work_alloc_mt(int nworks, void *data,
 {
 	int i;
 
-	spin_lock_bh(&padata_works_lock);
+	spin_lock(&padata_works_lock);
 	/* Start at 1 because the current task participates in the job. */
 	for (i = 1; i < nworks; ++i) {
 		struct padata_work *pw = padata_work_alloc();
@@ -85,7 +85,7 @@ static int __init padata_work_alloc_mt(int nworks, void *data,
 		padata_work_init(pw, padata_mt_helper, data, 0);
 		list_add(&pw->pw_list, head);
 	}
-	spin_unlock_bh(&padata_works_lock);
+	spin_unlock(&padata_works_lock);
 
 	return i;
 }
@@ -103,12 +103,12 @@ static void __init padata_works_free(struct list_head *works)
 	if (list_empty(works))
 		return;
 
-	spin_lock_bh(&padata_works_lock);
+	spin_lock(&padata_works_lock);
 	list_for_each_entry_safe(cur, next, works, pw_list) {
 		list_del(&cur->pw_list);
 		padata_work_free(cur);
 	}
-	spin_unlock_bh(&padata_works_lock);
+	spin_unlock(&padata_works_lock);
 }
 
 static void __init padata_mt_helper(struct work_struct *w)

base-commit: af5e34a41cd607c00ef752e00331736570992354
prerequisite-patch-id: 57ddb64f17182e9382163da55150610d385274df
prerequisite-patch-id: 9ea2c856c57f6c92abe7f2b52e701e46398cb5bb
prerequisite-patch-id: d64acc3296775ba4482d99b5a7d567af22a859a5
prerequisite-patch-id: 095134ce73f4279a0af1708ed2de4135bcb3e2eb
-- 
2.47.3


             reply	other threads:[~2026-07-17 20:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 20:50 Daniel Jordan [this message]
2026-07-17 22:42 ` Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260717205028.63847-1-daniel.m.jordan@oracle.com \
    --to=daniel.m.jordan@oracle.com \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®