Dmitry Baryshkov
577e2a9dfc
drm/msm: don't free the IRQ if it was not requested
As msm_drm_uninit() is called from the msm_drm_init() error path,
additional care should be necessary as not to call the free_irq() for
the IRQ that was not requested before (because an error occured earlier
than the request_irq() call).
This fixed the issue reported with the following backtrace:
[ 8.571329] Trying to free already-free IRQ 187
[ 8.571339] WARNING: CPU: 0 PID: 76 at kernel/irq/manage.c:1895 free_irq+0x1e0/0x35c
[ 8.588746] Modules linked in: pmic_glink pdr_interface fastrpc qrtr_smd snd_soc_hdmi_codec msm fsa4480 gpu_sched drm_dp_aux_bus qrtr i2c_qcom_geni crct10dif_ce qcom_stats qcom_q6v5_pas drm_display_helper gpi qcom_pil_info drm_kms_helper qcom_q6v5 qcom_sysmon qcom_common qcom_glink_smem qcom_rng mdt_loader qmi_helpers phy_qcom_qmp ufs_qcom typec qnoc_sm8350 socinfo rmtfs_mem fuse drm ipv6
[ 8.624154] CPU: 0 PID: 76 Comm: kworker/u16:2 Not tainted 5.18.0-rc5-next-20220506-00033-g6cee8cab6089-dirty #419
[ 8.624161] Hardware name: Qualcomm Technologies, Inc. SM8350 HDK (DT)
[ 8.641496] Workqueue: events_unbound deferred_probe_work_func
[ 8.647510] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 8.654681] pc : free_irq+0x1e0/0x35c
[ 8.658454] lr : free_irq+0x1e0/0x35c
[ 8.662228] sp : ffff800008ab3950
[ 8.665642] x29: ffff800008ab3950 x28: 0000000000000000 x27: ffff16350f56a700
[ 8.672994] x26: ffff1635025df080 x25: ffff16350251badc x24: ffff16350251bb90
[ 8.680343] x23: 0000000000000000 x22: 00000000000000bb x21: ffff16350e8f9800
[ 8.687690] x20: ffff16350251ba00 x19: ffff16350cbd5880 x18: ffffffffffffffff
[ 8.695039] x17: 0000000000000000 x16: ffffa2dd12179434 x15: ffffa2dd1431d02d
[ 8.702391] x14: 0000000000000000 x13: ffffa2dd1431d028 x12: 662d79646165726c
[ 8.709740] x11: ffffa2dd13fd2438 x10: 000000000000000a x9 : 00000000000000bb
[ 8.717111] x8 : ffffa2dd13fd23f0 x7 : ffff800008ab3750 x6 : 00000000fffff202
[ 8.724487] x5 : ffff16377e870a18 x4 : 00000000fffff202 x3 : ffff735a6ae1b000
[ 8.731851] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff1635015f8000
[ 8.739217] Call trace:
[ 8.741755] free_irq+0x1e0/0x35c
[ 8.745198] msm_drm_uninit.isra.0+0x14c/0x294 [msm]
[ 8.750548] msm_drm_bind+0x28c/0x5d0 [msm]
[ 8.755081] try_to_bring_up_aggregate_device+0x164/0x1d0
[ 8.760657] __component_add+0xa0/0x170
[ 8.764626] component_add+0x14/0x20
[ 8.768337] dp_display_probe+0x2a4/0x464 [msm]
[ 8.773242] platform_probe+0x68/0xe0
[ 8.777043] really_probe.part.0+0x9c/0x28c
[ 8.781368] __driver_probe_device+0x98/0x144
[ 8.785871] driver_probe_device+0x40/0x140
[ 8.790191] __device_attach_driver+0xb4/0x120
[ 8.794788] bus_for_each_drv+0x78/0xd0
[ 8.798751] __device_attach+0xdc/0x184
[ 8.802713] device_initial_probe+0x14/0x20
[ 8.807031] bus_probe_device+0x9c/0xa4
[ 8.810991] deferred_probe_work_func+0x88/0xc0
[ 8.815667] process_one_work+0x1d0/0x320
[ 8.819809] worker_thread+0x14c/0x444
[ 8.823688] kthread+0x10c/0x110
[ 8.827036] ret_from_fork+0x10/0x20
Reported-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Fixes: f026e431cf ("drm/msm: Convert to Linux IRQ interfaces")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/485422/
Link: https://lore.kernel.org/r/20220507010021.1667700-1-dmitry.baryshkov@linaro.org
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
2022-05-18 15:55:46 -07:00
..
2022-04-07 10:23:23 +10:00
2022-05-02 02:12:59 +03:00
2022-03-28 12:41:28 -07:00
2022-03-03 09:08:35 +10:30
2022-02-25 05:50:18 +10:00
2022-01-27 19:15:46 +01:00
2022-03-24 16:19:43 -07:00
2022-03-04 13:41:57 +10:00
2022-03-28 12:41:28 -07:00
2022-03-28 12:41:28 -07:00
2022-01-27 19:15:46 +01:00
2022-01-27 19:15:48 +01:00
2022-02-07 16:35:35 -08:00
2022-03-28 12:41:28 -07:00
2022-02-25 05:50:18 +10:00
2022-03-25 14:57:47 -07:00
2022-04-04 09:37:42 +02:00
2022-03-28 12:41:28 -07:00
2022-02-25 05:50:18 +10:00
2022-02-23 10:44:43 +01:00
2022-02-25 05:50:18 +10:00
2022-03-28 12:41:28 -07:00
2022-03-28 12:41:28 -07:00
2022-03-28 12:41:28 -07:00
2021-09-25 08:20:48 -07:00
2022-03-24 16:19:43 -07:00
2022-05-18 15:55:46 -07:00
2022-02-25 05:50:18 +10:00
2022-04-05 11:37:03 +02:00
2022-03-28 12:41:28 -07:00
2022-04-07 10:22:43 +10:00
2022-03-04 13:41:57 +10:00
2021-11-30 11:10:03 +01:00
2022-02-25 05:50:18 +10:00
2021-10-28 14:59:38 +10:00
2022-03-15 15:01:12 -04:00
2022-05-02 02:12:59 +03:00
2022-03-28 12:41:28 -07:00
2022-02-23 10:04:14 +01:00
2022-03-21 11:05:05 +01:00
2022-01-27 19:15:47 +01:00
2022-03-04 13:41:57 +10:00
2022-03-28 12:41:28 -07:00
2022-03-28 12:41:28 -07:00
2022-02-25 14:14:28 +01:00
2022-03-28 12:41:28 -07:00
2022-03-04 13:41:57 +10:00
2022-01-27 19:15:47 +01:00
2022-01-27 19:15:50 +01:00
2022-03-24 16:19:43 -07:00
2022-03-21 10:46:57 +01:00
2022-01-27 19:15:48 +01:00
2022-02-07 16:35:35 -08:00
2022-03-01 22:37:13 -01:00
2022-02-25 05:50:18 +10:00
2022-05-02 02:12:59 +03:00
2021-12-02 11:12:39 +01:00
2022-02-14 09:42:01 +01:00
2022-05-02 02:12:59 +03:00
2022-02-07 17:03:24 +01:00
2022-03-28 14:32:39 -07:00
2022-02-07 17:03:24 +01:00
2022-01-14 14:31:54 +01:00
2022-02-25 17:57:14 +01:00
2022-02-16 12:32:07 +02:00
2022-01-26 09:40:24 +01:00
2021-11-26 16:45:22 +01:00
2022-02-15 15:25:18 -08:00
2021-09-24 19:25:23 +02:00
2022-02-23 10:44:43 +01:00
2022-03-24 16:19:43 -07:00
2022-02-07 13:04:25 -08:00
2022-02-07 16:35:35 -08:00
2022-01-25 09:36:20 +01:00
2022-03-01 11:37:21 -08:00
2022-01-17 11:25:44 +01:00
2021-10-04 09:34:57 -04:00
2022-02-15 15:25:18 -08:00
2021-10-14 21:39:02 +02:00
2022-01-17 11:25:44 +01:00
2022-03-24 11:41:14 +02:00
2022-02-25 05:50:18 +10:00
2022-02-16 13:29:04 +01:00
2021-12-16 11:23:22 +01:00
2022-01-31 21:45:23 +01:00
2021-10-25 09:33:22 +02:00
2022-02-28 14:57:14 +10:00
2022-02-07 16:35:35 -08:00
2022-02-25 05:50:18 +10:00
2022-02-07 16:35:35 -08:00
2022-02-07 16:35:35 -08:00
2022-02-25 05:50:18 +10:00
2021-11-30 09:41:28 +01:00
2022-02-07 16:35:35 -08:00
2022-01-31 21:45:23 +01:00
2021-10-22 16:20:12 +02:00
2022-01-17 11:25:44 +01:00
2021-10-01 15:55:47 +02:00
2021-11-30 09:41:28 +01:00
2022-02-07 16:35:35 -08:00
2021-09-24 19:25:33 +02:00
2022-01-22 08:33:37 +02:00
2022-02-25 17:55:42 +01:00
2022-02-28 10:29:33 +01:00
2022-01-22 08:33:37 +02:00
2021-11-27 21:05:58 +01:00
2022-04-08 09:13:38 +10:00
2022-01-31 13:19:33 -05:00
2021-10-07 12:24:44 +02:00
2022-01-31 21:45:24 +01:00
2022-02-07 16:35:35 -08:00
2022-02-01 19:02:41 +10:00
2022-02-25 05:50:18 +10:00
2021-11-02 14:27:14 +01:00
2021-10-07 05:42:13 +03:00
2022-02-11 11:30:01 +01:00
2021-11-02 14:27:06 +01:00
2022-05-02 02:12:59 +03:00
2022-02-23 10:43:25 +01:00
2022-02-16 13:29:04 +01:00