ASoC: codecs: rt5640: Always disable IRQs from rt5640_cancel_work()
authorHans de Goede <hdegoede@redhat.com>
Thu, 24 Oct 2024 21:56:12 +0000 (23:56 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 24 Oct 2024 23:50:13 +0000 (00:50 +0100)
commit032532f91a1d06d0750f16c49a9698ef5374a68f
treeea7aa41a62dcd8d67a8e53be7f9c9b4e92497261
parentdb7e59e6a39a4d3d54ca8197c796557e6d480b0d
ASoC: codecs: rt5640: Always disable IRQs from rt5640_cancel_work()

Disable IRQs from rt5640_cancel_work(), this fixes a crash caused by
the IRQ never getting freed when the driver is unbound from the i2c_client
with jack-detection active:

[  193.138780] rt5640 i2c-rt5640: ASoC: unknown pin LDO2
[  193.138830] rt5640 i2c-rt5640: ASoC: unknown pin MICBIAS1
[  193.671218] BUG: kernel NULL pointer dereference, address: 0000000000000078
[  193.671239] #PF: supervisor read access in kernel mode
[  193.671248] #PF: error_code(0x0000) - not-present page
...
[  193.671531]  ? asm_exc_page_fault+0x22/0x30
[  193.671551]  ? rt5640_jack_inserted+0x10/0x80 [snd_soc_rt5640]
[  193.671574]  rt5640_detect_headset+0x93/0x130 [snd_soc_rt5640]
[  193.671596]  rt5640_jack_work+0x93/0x355 [snd_soc_rt5640]

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patch.msgid.link/20241024215612.92147-1-hdegoede@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5640.c