Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/rockchip: Fix crash when find connector from bridge
The function drm_connector_list_iter_end() will be called twice when connector is found, that will cause crash. crash: [ 1.201561] Unable to handle kernel read from unreadable memory at virtual address 0000000000000318 [ 2.886426] Mem abort info: [ 2.889222] ESR = 0x96000005 [ 2.892276] Exception class = DABT (current EL), IL = 32 bits [ 2.898189] SET = 0, FnV = 0 [ 2.901244] EA = 0, S1PTW = 0 [ 2.904379] Data abort info: [ 2.907256] ISV = 0, ISS = 0x00000005 [ 2.911086] CM = 0, WnR = 0 [ 2.914058] [0000000000000318] user address but active_mm is swapper [ 2.920410] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 2.925983] Modules linked in: [ 2.929041] Process kworker/5:1 (pid: 60, stack limit = 0x00000000e4da41d3) [ 2.935997] CPU: 5 PID: 60 Comm: kworker/5:1 Not tainted 4.19.111 rockchip-linux#200 [ 2.942522] Hardware name: Rockchip RK3368 R88 AVB (DT) [ 2.947753] Workqueue: events deferred_probe_work_func [ 2.952895] pstate: 60400085 (nZCv daIf +PAN -UAO) [ 2.957686] pc : __ll_sc___cmpxchg_case_acq_4+0x4/0x20 [ 2.962828] lr : _raw_spin_lock_irqsave+0x34/0x70 [ 2.967529] sp : ffffff8009cc38e0 [ 2.970843] x29: ffffff8009cc38e0 x28: ffffffc03dedb8b8 [ 2.976158] x27: ffffffc03ded4480 x26: ffffff8009cc3a28 [ 2.981465] x25: ffffffc03decbdd8 x24: ffffffc03dedcd90 [ 2.986780] x23: ffffff80096ed000 x22: ffffffc00a2dd890 [ 2.992095] x21: ffffff80091fbe20 x20: 0000000000000318 [ 2.997410] x19: 0000000000000000 x18: ffffffffffffffff [ 3.002726] x17: 0000000000000000 x16: 0000000000000000 [ 3.008042] x15: ffffff80096eda48 x14: ffffff80898b7e37 [ 3.013357] x13: ffffff80098b7e45 x12: ffffff80098b8280 [ 3.018673] x11: ffffff800970e000 x10: 0000000005f5e0ff [ 3.023989] x9 : 00000000ffffffd0 x8 : 625f79625f726f74 [ 3.029296] x7 : 0000000000000030 x6 : 000000000000024a [ 3.034602] x5 : 0000000000000000 x4 : 0000000000000000 [ 3.039907] x3 : 0000000000000318 x2 : 0000000000000001 [ 3.045222] x1 : 0000000000000000 x0 : 0000000000000318 [ 4.266041] Call trace: [ 4.268489] __ll_sc___cmpxchg_case_acq_4+0x4/0x20 [ 4.273279] drm_connector_list_iter_end+0x2c/0x58 [ 4.278068] rockchip_drm_bind+0x1c20/0x1c38 [ 4.282338] try_to_bring_up_master+0x144/0x1a8 [ 4.286867] component_master_add_with_match+0xd4/0x130 [ 4.292090] rockchip_drm_platform_probe+0x178/0x2e8 [ 4.297054] platform_drv_probe+0x50/0xa8 [ 4.301065] really_probe+0x200/0x2b0 [ 4.304734] driver_probe_device+0x58/0x100 [ 4.308921] __device_attach_driver+0x90/0xc0 [ 4.313274] bus_for_each_drv+0x70/0xc8 [ 4.317110] __device_attach+0xdc/0x138 [ 4.320944] device_initial_probe+0x10/0x18 [ 4.325131] bus_probe_device+0x94/0xa0 [ 4.328965] deferred_probe_work_func+0x80/0xb8 [ 4.333497] process_one_work+0x1a0/0x418 [ 4.337508] worker_thread+0x1e4/0x3e0 [ 4.341260] kthread+0x12c/0x158 [ 4.344493] ret_from_fork+0x10/0x18 [ 4.348072] Code: 35ffff91 aa1003e0 d65f03c0 f980001 (885ffc10) Change-Id: I0a3c9e038b4ffe31feaa8356a0ce3e62f6f3c374 Signed-off-by: Algea Cao <[email protected]> rk-5.4-drm 56fe1c4
- Loading branch information