From e2b348354112df63a9c2ea4219a6867c6c7ea100 Mon Sep 17 00:00:00 2001 From: Steffen Klassert Date: Wed, 10 Nov 2010 12:21:43 +0100 Subject: crypto: pcrypt - Fix use after free on padata_free kobject_put is called from padata_free for the padata kobject. The kobject's release function frees the padata instance, so don't call kobject_put for the padata kobject from pcrypt. Reported-and-tested-by: Randy Dunlap Signed-off-by: Steffen Klassert Signed-off-by: Linus Torvalds --- crypto/pcrypt.c | 1 - 1 file changed, 1 deletion(-) (limited to 'crypto/pcrypt.c') diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index de3078215fe..75586f1f86e 100644 --- a/crypto/pcrypt.c +++ b/crypto/pcrypt.c @@ -504,7 +504,6 @@ err: static void pcrypt_fini_padata(struct padata_pcrypt *pcrypt) { - kobject_put(&pcrypt->pinst->kobj); free_cpumask_var(pcrypt->cb_cpumask->mask); kfree(pcrypt->cb_cpumask); -- cgit v1.2.3-70-g09d2