Patch "drm/bridge: adv7511: fix crash on irq during probe" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/bridge: adv7511: fix crash on irq during probe

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-bridge-adv7511-fix-crash-on-irq-during-probe.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 919a7691bf1164c2bc279052c56ee201480fb1ef
Author: Mads Bligaard Nielsen <bli@xxxxxxxxxxxxxxx>
Date:   Mon Feb 19 21:21:47 2024 +0100

    drm/bridge: adv7511: fix crash on irq during probe
    
    [ Upstream commit aeedaee5ef5468caf59e2bb1265c2116e0c9a924 ]
    
    Moved IRQ registration down to end of adv7511_probe().
    
    If an IRQ already is pending during adv7511_probe
    (before adv7511_cec_init) then cec_received_msg_ts
    could crash using uninitialized data:
    
        Unable to handle kernel read from unreadable memory at virtual address 00000000000003d5
        Internal error: Oops: 96000004 [#1] PREEMPT_RT SMP
        Call trace:
         cec_received_msg_ts+0x48/0x990 [cec]
         adv7511_cec_irq_process+0x1cc/0x308 [adv7511]
         adv7511_irq_process+0xd8/0x120 [adv7511]
         adv7511_irq_handler+0x1c/0x30 [adv7511]
         irq_thread_fn+0x30/0xa0
         irq_thread+0x14c/0x238
         kthread+0x190/0x1a8
    
    Fixes: 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support")
    Signed-off-by: Mads Bligaard Nielsen <bli@xxxxxxxxxxxxxxx>
    Signed-off-by: Alvin Šipraga <alsi@xxxxxxxxxxxxxxx>
    Reviewed-by: Robert Foss <rfoss@xxxxxxxxxx>
    Signed-off-by: Robert Foss <rfoss@xxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240219-adv7511-cec-irq-crash-fix-v2-1-245e53c4b96f@xxxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 8be235144f6d9..6fc292393c674 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -1277,17 +1277,6 @@ static int adv7511_probe(struct i2c_client *i2c)
 
 	INIT_WORK(&adv7511->hpd_work, adv7511_hpd_work);
 
-	if (i2c->irq) {
-		init_waitqueue_head(&adv7511->wq);
-
-		ret = devm_request_threaded_irq(dev, i2c->irq, NULL,
-						adv7511_irq_handler,
-						IRQF_ONESHOT, dev_name(dev),
-						adv7511);
-		if (ret)
-			goto err_unregister_cec;
-	}
-
 	adv7511_power_off(adv7511);
 
 	i2c_set_clientdata(i2c, adv7511);
@@ -1311,6 +1300,17 @@ static int adv7511_probe(struct i2c_client *i2c)
 
 	adv7511_audio_init(dev, adv7511);
 
+	if (i2c->irq) {
+		init_waitqueue_head(&adv7511->wq);
+
+		ret = devm_request_threaded_irq(dev, i2c->irq, NULL,
+						adv7511_irq_handler,
+						IRQF_ONESHOT, dev_name(dev),
+						adv7511);
+		if (ret)
+			goto err_unregister_audio;
+	}
+
 	if (adv7511->info->has_dsi) {
 		ret = adv7533_attach_dsi(adv7511);
 		if (ret)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux