Skip to content

Commit

Permalink
arm64: configs: fix NULL pointer dereference of uart_suspend_port() f…
Browse files Browse the repository at this point in the history
…or rk3326_linux

The RUNTIME_UARTS shall be equal to NR_UARTS, otherwise we may encounter
NULL pointer when uart (RUNTIME_UARTS - 1) is enabled during suspending.

[   26.529745] Unable to handle kernel NULL pointer dereference at virtual address 000000c4
[   26.530484] pgd = ffffffc01d5d5000
[   26.530853] [000000c4] *pgd=000000001d6b9003, *pud=000000001d6b9003, *pmd=0000000000000000
[   26.531717] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[   26.532231] Modules linked in:
[   26.532550] CPU: 1 PID: 594 Comm: sh Not tainted 4.4.189 #16
[   26.533065] Hardware name: Rockchip rk3326 evb lpddr3 v10 board for robot linux (DT)
[   26.533765] task: ffffffc01e554240 task.stack: ffffffc01d7d4000
[   26.534315] PC is at uart_suspend_port+0x54/0x1c0
[   26.534755] LR is at uart_suspend_port+0x50/0x1c0

.......

[   26.699502] [<ffffff80082dd1a8>] uart_suspend_port+0x54/0x1c0
[   26.700039] [<ffffff80082e01bc>] serial8250_suspend_port+0x98/0xa4
[   26.700607] [<ffffff80082e4fe0>] dw8250_suspend+0x28/0x54
[   26.701106] [<ffffff800836c7cc>] platform_pm_suspend+0x2c/0x4c
[   26.701652] [<ffffff80083758e8>] dpm_run_callback+0x50/0x98
[   26.702175] [<ffffff8008376070>] __device_suspend+0x238/0x2e4
[   26.702709] [<ffffff8008377574>] dpm_suspend+0xc0/0x1f4

Change-Id: Ibf04fe0aa04c179c9cf9ba43e4d73ba1f3d0714e
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
  • Loading branch information
ZhengShunQian authored and rkhuangtao committed Dec 5, 2019
1 parent 128ece7 commit 0d25370
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/configs/rk3326_linux_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=6
CONFIG_SERIAL_8250_RUNTIME_UARTS=6
CONFIG_SERIAL_8250_DW=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_HW_RANDOM=y
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/rk3326_linux_robot_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=6
CONFIG_SERIAL_8250_RUNTIME_UARTS=6
CONFIG_SERIAL_8250_DW=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_HW_RANDOM=y
Expand Down

0 comments on commit 0d25370

Please sign in to comment.