]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: tas2781: add module parameter to tascodec_init()
authorGergo Koteles <soyer@irl.hu>
Sun, 4 Feb 2024 20:01:17 +0000 (21:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:14 +0000 (09:25 +0100)
commiteb06fca2c740b49f836a2fc3068ec27b051fd7c5
tree56da6f5dd53cf20df73dfd8bc1e58849a63d2894
parent1be2669565b3795e2a1e2b97adb059410d8d8d53
ASoC: tas2781: add module parameter to tascodec_init()

commit 34a1066981a967eab619938e7b35a9be6b4c34e1 upstream.

The tascodec_init() of the snd-soc-tas2781-comlib module is called from
snd-soc-tas2781-i2c and snd-hda-scodec-tas2781-i2c modules. It calls
request_firmware_nowait() with parameter THIS_MODULE and a cont/callback
from the latter modules.

The latter modules can be removed while their callbacks are running,
resulting in a general protection failure.

Add module parameter to tascodec_init() so request_firmware_nowait() can
be called with the module of the callback.

Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/118dad922cef50525e5aab09badef2fa0eb796e5.1707076603.git.soyer@irl.hu
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/sound/tas2781.h
sound/pci/hda/tas2781_hda_i2c.c
sound/soc/codecs/tas2781-comlib.c
sound/soc/codecs/tas2781-i2c.c