mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
ASoC: sti: initialize IRQ lock before requesting IRQ
uni_reader_init() registers the shared IRQ before initializing
reader->irq_lock. A pending interrupt can invoke the handler while the
lock is still uninitialized.
Initialize the lock before registering the IRQ so the interrupt path
always sees valid lock state.
Fixes: d05d862ead ("ASoC: STI: Fix null ptr deference in IRQ handler")
Cc: [email protected]
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
1 parent
173cb3147b
commit
04405aeef4
1 file changed
+2
-2
@@ -416,6 +416,8 @@ int uni_reader_init(struct platform_device *pdev,
|
||||
else
|
||||
reader->hw = &uni_reader_pcm_hw;
|
||||
|
||||
spin_lock_init(&reader->irq_lock);
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, reader->irq,
|
||||
uni_reader_irq_handler, IRQF_SHARED,
|
||||
dev_name(&pdev->dev), reader);
|
||||
@@ -424,8 +426,6 @@ int uni_reader_init(struct platform_device *pdev,
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
spin_lock_init(&reader->irq_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(uni_reader_init);
|
||||
Reference in new issue
Block a user