Skip to content

Commit

Permalink
crypto: pcrypt - Fix use after free on padata_free
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
klassert authored and torvalds committed Nov 12, 2010
1 parent bd760e1 commit e2b3483
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion crypto/pcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ static int pcrypt_init_padata(struct padata_pcrypt *pcrypt,

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);

Expand Down

0 comments on commit e2b3483

Please sign in to comment.