summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-05 10:47:57 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-05 10:47:57 -0800
commit586fac13f8685bf9dfb32e1ee98bfb14f0dd0061 (patch)
tree6fe7df764a4298a15967139b8f2c69f88d5e22fc /kernel
parent1f63b9c15b17d5af360c180f5c71537e954d5d3b (diff)
parent74781387822cd7a549123ae2b35862bf802689be (diff)
downloadlinux-586fac13f8685bf9dfb32e1ee98bfb14f0dd0061.tar.gz
linux-586fac13f8685bf9dfb32e1ee98bfb14f0dd0061.tar.bz2
linux-586fac13f8685bf9dfb32e1ee98bfb14f0dd0061.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: padata: Allocate the cpumask for the padata instance crypto: authenc - Move saved IV in front of the ablkcipher request crypto: hash - Fix handling of unaligned buffers crypto: authenc - Use correct ahash complete functions crypto: md5 - Set statesize
Diffstat (limited to 'kernel')
-rw-r--r--kernel/padata.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/padata.c b/kernel/padata.c
index 6f9bcb8313d6..93caf65ff57c 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -642,6 +642,9 @@ struct padata_instance *padata_alloc(const struct cpumask *cpumask,
if (!pd)
goto err_free_inst;
+ if (!alloc_cpumask_var(&pinst->cpumask, GFP_KERNEL))
+ goto err_free_pd;
+
rcu_assign_pointer(pinst->pd, pd);
pinst->wq = wq;
@@ -654,12 +657,14 @@ struct padata_instance *padata_alloc(const struct cpumask *cpumask,
pinst->cpu_notifier.priority = 0;
err = register_hotcpu_notifier(&pinst->cpu_notifier);
if (err)
- goto err_free_pd;
+ goto err_free_cpumask;
mutex_init(&pinst->lock);
return pinst;
+err_free_cpumask:
+ free_cpumask_var(pinst->cpumask);
err_free_pd:
padata_free_pd(pd);
err_free_inst:
@@ -685,6 +690,7 @@ void padata_free(struct padata_instance *pinst)
unregister_hotcpu_notifier(&pinst->cpu_notifier);
padata_free_pd(pinst->pd);
+ free_cpumask_var(pinst->cpumask);
kfree(pinst);
}
EXPORT_SYMBOL(padata_free);