diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-09-10 04:46:22 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-09-10 04:46:22 +0200 |
commit | 7fe10096c1508c7f033d34d0741809f8eecc1ed4 (patch) | |
tree | 09d6cb29f7ed5bbd581584eb8f11df94498bec9d /kernel | |
parent | Merge tag 'nfs-for-5.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs (diff) | |
parent | padata: fix possible padata_works_lock deadlock (diff) | |
download | linux-7fe10096c1508c7f033d34d0741809f8eecc1ed4.tar.xz linux-7fe10096c1508c7f033d34d0741809f8eecc1ed4.zip |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu:
"This fixes a regression in padata"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
padata: fix possible padata_works_lock deadlock
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/padata.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/padata.c b/kernel/padata.c index 16cb894dc272..d4d3ba6e1728 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -215,12 +215,13 @@ int padata_do_parallel(struct padata_shell *ps, padata->pd = pd; padata->cb_cpu = *cb_cpu; - rcu_read_unlock_bh(); - spin_lock(&padata_works_lock); padata->seq_nr = ++pd->seq_nr; pw = padata_work_alloc(); spin_unlock(&padata_works_lock); + + rcu_read_unlock_bh(); + if (pw) { padata_work_init(pw, padata_parallel_worker, padata, 0); queue_work(pinst->parallel_wq, &pw->pw_work); |