summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-09-12 14:32:41 +0300
committerMark Brown <broonie@kernel.org>2023-09-12 16:37:47 +0300
commitdf7d595f6bd9dc96cc275cc4b0f313fcfa423c58 (patch)
treea0043859ecae5e8a7a89c5268164f1822bddf095 /include
parentfa6a0c0c1dd53b3949ca56bf7213648dfd6a62ee (diff)
downloadlinux-df7d595f6bd9dc96cc275cc4b0f313fcfa423c58.tar.xz
ASoC: rt5640: Fix sleep in atomic context
Following prints are observed while testing audio on Jetson AGX Orin which has onboard RT5640 audio codec: BUG: sleeping function called from invalid context at kernel/workqueue.c:3027 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0 preempt_count: 10001, expected: 0 RCU nest depth: 0, expected: 0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x1e0/0x270 ---[ end trace ad1c64905aac14a6 ]- The IRQ handler rt5640_irq() runs in interrupt context and can sleep during cancel_delayed_work_sync(). The only thing which rt5640_irq() does is cancel + (re-)queue the jack_work delayed_work. This can be done in a single non sleeping call by replacing queue_delayed_work() with mod_delayed_work(), avoiding the sleep in atomic context. Fixes: 051dade34695 ("ASoC: rt5640: Fix the wrong state of JD1 and JD2") Reported-by: Sameer Pujar <spujar@nvidia.com> Closes: https://lore.kernel.org/r/1688015537-31682-4-git-send-email-spujar@nvidia.com Cc: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230912113245.320159-3-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions