summaryrefslogtreecommitdiff
path: root/.checkpatch.conf
diff options
context:
space:
mode:
authorWilliam Wu <william.wu@rock-chips.com>2019-03-14 09:27:40 +0800
committerTao Huang <huangtao@rock-chips.com>2019-03-15 18:33:43 +0800
commitafd36f12503ae8dcde5e2ce509faeba9d86c985d (patch)
tree6ef36e7c1041289be95f18ab6dbcaf0a41821cf5 /.checkpatch.conf
parent6c29e919eb91192e7f2be07d6ec421cb6000bdcd (diff)
usb: dwc3: rockchip: fix NULL pointer dereference in async probe
In dwc3_rockchip_async_probe(), if it tries to get hcd in peripheral only mode (dr_mode = "peripheral"), a NULL pointer deference will happen. Because hcd only be allocated and initialized in host mode or otg mode. We can reproduce this issue when set dr_mode to peripheral in DTS, like rk3399pro-npu.dtsi, and get the following panic log on RK1808 EVB: Unable to handle kernel NULL pointer dereference at virtual address 000000b0 pgd = ffffff8008b0b000 [000000b0] *pgd=000000007fffe003, *pud=000000007fffe003, *pmd=0000000000000000 Internal error: Oops: 96000005 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 29 Comm: kworker/u4:1 Not tainted 4.4.167 #493 Hardware name: Rockchip RK1808 EVB V10 Board (DT) Workqueue: events_unbound async_run_entry_fn task: ffffffc07cd29580 task.stack: ffffffc07cd40000 PC is at dwc3_rockchip_async_probe+0x28/0x1c8 LR is at async_run_entry_fn+0x48/0x100 pc : [<ffffff80083adf5c>] lr : [<ffffff80080b445c>] pstate: 60000045 sp : ffffffc07cd43d10 ... [<ffffff80083adf5c>] dwc3_rockchip_async_probe+0x28/0x1c8 [<ffffff80080b445c>] async_run_entry_fn+0x48/0x100 [<ffffff80080acca8>] process_one_work+0x1b8/0x2b8 [<ffffff80080ad94c>] worker_thread+0x304/0x418 [<ffffff80080b206c>] kthread+0xd0/0xd8 [<ffffff8008082e80>] ret_from_fork+0x10/0x50 Fixes: f2a2b34e456b ("usb: dwc3: rockchip: use async_schedule for initial dwc3") Change-Id: I740936e43bc4ea2b5a056d6d9dcaf18466006f0c Signed-off-by: William Wu <william.wu@rock-chips.com>
Diffstat (limited to '.checkpatch.conf')
0 files changed, 0 insertions, 0 deletions