crypto: pcrypt - Fix use after free on padata_free
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 10 Nov 2010 11:21:43 +0000 (12:21 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Nov 2010 15:58:46 +0000 (07:58 -0800)
commite2b348354112df63a9c2ea4219a6867c6c7ea100
treeb9a0703ac3e356e3df7941a5e6e53dd6e83fefde
parentbd760e1e5b34351e0705705e5163cb89c1316d71
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 <randy.dunlap@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
crypto/pcrypt.c