Commit 7fb542ff authored by Wang Yufen's avatar Wang Yufen Committed by Zheng Zengkai
Browse files

powerpc/pseries: fix potential memory leak in init_cpu_associativity()

stable inclusion
from stable-v6.6.2
commit e9643291b3e43f5f9b727779b54984fcde16050f
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IW7G

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e9643291b3e43f5f9b727779b54984fcde16050f



--------------------------------

[ Upstream commit 95f1a128cd728a7257d78e868f1f5a145fc43736 ]

If the vcpu_associativity alloc memory successfully but the
pcpu_associativity fails to alloc memory, the vcpu_associativity
memory leaks.

Fixes: d62c8dee ("powerpc/pseries: Provide vcpu dispatch statistics")
Signed-off-by: default avatarWang Yufen <wangyufen@huawei.com>
Reviewed-by: default avatar"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/1671003983-10794-1-git-send-email-wangyufen@huawei.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 19d8a8b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment