wireless: rtl8852bs: fix oops in rtw_phl_cmd_scan_request() during
suspend Unable to handle kernel NULL pointer dereference at virtual address 0000000000000169 Oops [#1] Modules linked in: algif_hash algif_skcipher af_alg 8852bs binfmt_misc sch_fq_codel ip_tables autofs4 CPU: 5 PID: 1001 Comm: fsm_thread Tainted: G W 6.6.63 #20250623142956 Hardware name: spacemit k1-x deb1 board (DT) epc : rtw_phl_cmd_scan_request+0x24/0x98c [8852bs] ra : rtw_sitesurvey_cmd+0x3e8/0x67a [8852bs] epc : ffffffff0237dc42 ra : ffffffff022fa748 sp : ffffffc80939ba00 gp : ffffffff820fac50 tp : ffffffd905ff8c80 t0 : ffffffc80939baa8 t1 : 0000000000000001 t2 : 4f525245203a5754 s0 : ffffffc80939bae0 s1 : ffffffc80926e18c a0 : ffffffc80063d000 a1 : ffffffd904328000 a2 : 0000000000000010 a3 : 0000000000006312 a4 : 0000000000000000 a5 : 0000000000000000 a6 : 0000000000000000 a7 : ffffffff8213c7b8 s2 : ffffffc80926d048 s3 : ffffffd904328000 s4 : ffffffff026b8c08 s5 : ffffffd907830000 s6 : 0000000000000000 s7 : 0000000000000070 s8 : 0000000000000001 s9 : ffffffff026b7fd8 s10: ffffffd907837a78 s11: ffffffd92c6dfe00 t3 : ffffffff82112ba7 t4 : ffffffff82112ba7 t5 : ffffffff82112ba8 t6 : ffffffd9078300aa status: 0000000200000120 badaddr: 0000000000000169 cause: 000000000000000d [<ffffffff0237dc42>] rtw_phl_cmd_scan_request+0x24/0x98c [8852bs] [<ffffffff022fa748>] rtw_sitesurvey_cmd+0x3e8/0x67a [8852bs] [<ffffffff0227ba34>] rrm_sitesurvey.constprop.0.isra.0+0xd2/0x19e [8852bs] [<ffffffff0227f760>] rrm_do_meas_st_hdl+0x10a/0x30c [8852bs] [<ffffffff0227875c>] fsm_state_run.isra.0+0x66/0x128 [8852bs] [<ffffffff022794ee>] fsm_state_goto+0x50/0x13c [8852bs] [<ffffffff0227f482>] rrm_idle_st_hdl+0x2e2/0x356 [8852bs] [<ffffffff0227875c>] fsm_state_run.isra.0+0x66/0x128 [8852bs] [<ffffffff02278b9c>] fsm_thread_share+0x37e/0x478 [8852bs] [<ffffffff8003ea76>] kthread+0xda/0xf6 [<ffffffff80fde1ce>] ret_from_fork+0xe/0x18 Code: f556 1180 b703 1c05 ba17 0033 0a13 fd2a 2783 000a (4703) 1697 Change-Id: I0ae3eca28216f31824767ff4ba6eacc637be1537 Signed-off-by: wanlong <long.wan@spacemit.com>
This commit is contained in:
@@ -1990,6 +1990,11 @@ static struct rtw_phl_scan_param *_alloc_phl_param(_adapter *adapter, u8 scan_ch
|
||||
struct rtw_phl_scan_param *phl_param = NULL;
|
||||
struct scan_priv *scan_priv = NULL;
|
||||
|
||||
if (adapter->phl_role == NULL) {
|
||||
RTW_ERR(FUNC_ADPT_FMT" phl_role == NULL\n", FUNC_ADPT_ARG(adapter));
|
||||
goto _err_exit;
|
||||
}
|
||||
|
||||
if (scan_ch_num == 0) {
|
||||
RTW_ERR("%s scan_ch_num = 0\n", __func__);
|
||||
goto _err_exit;
|
||||
|
||||
Reference in New Issue
Block a user