Skip to content

Commit 7fe1009

Browse files
committed
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
2 parents ab29a80 + 1b0df11 commit 7fe1009

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kernel/padata.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,13 @@ int padata_do_parallel(struct padata_shell *ps,
215215
padata->pd = pd;
216216
padata->cb_cpu = *cb_cpu;
217217

218-
rcu_read_unlock_bh();
219-
220218
spin_lock(&padata_works_lock);
221219
padata->seq_nr = ++pd->seq_nr;
222220
pw = padata_work_alloc();
223221
spin_unlock(&padata_works_lock);
222+
223+
rcu_read_unlock_bh();
224+
224225
if (pw) {
225226
padata_work_init(pw, padata_parallel_worker, padata, 0);
226227
queue_work(pinst->parallel_wq, &pw->pw_work);

0 commit comments

Comments
 (0)