]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: codecs: wcd938x-sdw: fix use after free on driver unbind
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 3 Oct 2023 15:55:57 +0000 (17:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 09:58:56 +0000 (11:58 +0200)
commit6df571a6c153687020b98e3bc55631fcb46b50dd
treebf4b6145e95efa9c8ee82e83646f3fd1f29ef1d7
parent36eabe87031f7afb4338715ceac5b7550ea59e80
ASoC: codecs: wcd938x-sdw: fix use after free on driver unbind

commit f0dfdcbe706462495d47982eecd13a61aabd644d upstream.

Make sure to deregister the component when the driver is being unbound
and before the underlying device-managed resources are freed.

Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver")
Cc: stable@vger.kernel.org # 5.14
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20231003155558.27079-7-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/wcd938x-sdw.c