Commit 7fe10096 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents ab29a807 1b0df11f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);