All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: pcrypt - Fix use after free on padata_free
@ 2010-11-26  7:49 Steffen Klassert
  2010-11-26  8:49 ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Steffen Klassert @ 2010-11-26  7:49 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Randy Dunlap, linux-crypto

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-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 crypto/pcrypt.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
index de30782..75586f1 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);
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-26  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26  7:49 [PATCH] crypto: pcrypt - Fix use after free on padata_free Steffen Klassert
2010-11-26  8:49 ` Herbert Xu
2010-11-26  8:54   ` Steffen Klassert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.