[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190626034335.23767-6-sashal@kernel.org>
Date: Tue, 25 Jun 2019 23:43:07 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH AUTOSEL 4.19 06/34] ASoC: core: lock client_mutex while removing link components
From: Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>
[ Upstream commit 34ac3c3eb8f0c07252ceddf0a22dd240e5c91ccb ]
Removing link components results in topology unloading. So,
acquire the client_mutex before removing components in
soc_remove_link_components. This will prevent the lockdep warning
seen when dai links are removed during topology removal.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
sound/soc/soc-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 62aa320c2070..71e13f8f2579 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -979,12 +979,14 @@ static void soc_remove_link_components(struct snd_soc_card *card,
struct snd_soc_component *component;
struct snd_soc_rtdcom_list *rtdcom;
+ mutex_lock(&client_mutex);
for_each_rtdcom(rtd, rtdcom) {
component = rtdcom->component;
if (component->driver->remove_order == order)
soc_remove_component(component);
}
+ mutex_unlock(&client_mutex);
}
static void soc_remove_dai_links(struct snd_soc_card *card)
--
2.20.1
Powered by blists - more mailing lists