mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
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>
This commit is contained in:
parent
bd760e1e5b
commit
e2b3483541
1 changed files with 0 additions and 1 deletions
|
@ -504,7 +504,6 @@ err:
|
||||||
|
|
||||||
static void pcrypt_fini_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);
|
free_cpumask_var(pcrypt->cb_cpumask->mask);
|
||||||
kfree(pcrypt->cb_cpumask);
|
kfree(pcrypt->cb_cpumask);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue