Commit 526fb9f9 authored by Rander Wang's avatar Rander Wang Committed by Zhu Wang
Browse files

soundwire: stream: fix memory leak in stream config error path

mainline inclusion
from mainline-v5.13-rc1
commit 48f17f96
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I94VOP
CVE: CVE-2021-47020

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=48f17f96a81763c7c8bf5500460a359b9939359f



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

When stream config is failed, master runtime will release all
slave runtime in the slave_rt_list, but slave runtime is not
added to the list at this time. This patch frees slave runtime
in the config error path to fix the memory leak.

Fixes: 89e59053 ("soundwire: Add support for SoundWire stream management")
Signed-off-by: default avatarRander Wang <rander.wang@intel.com>
Reviewed-by: default avatarKeyon Jie <yang.jie@intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210331004610.12242-1-yung-chuan.liao@linux.intel.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarZhu Wang <wangzhu9@huawei.com>
parent ba030414
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment