2023-08-16 11:32:38

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH] wifi: rtw88: add missing call to cancel_work_sync()



> -----Original Message-----
> From: Dmitry Antipov <[email protected]>
> Sent: Tuesday, August 15, 2023 10:28 PM
> To: Ping-Ke Shih <[email protected]>
> Cc: Kalle Valo <[email protected]>; [email protected]; Dmitry Antipov <[email protected]>
> Subject: [PATCH] wifi: rtw88: add missing call to cancel_work_sync()
>
> Add missing call to 'cancel_work_sync()' in 'rtw_core_stop()'.
>
> Fixes: 5c831644e1f4 ("rtw88: handle and recover when firmware crash")
> Signed-off-by: Dmitry Antipov <[email protected]>

rtwdev->fw_recovery_work is used to restart hardware when firmware reports
things get abnormal. The calling flow will be

fw_ recovery_work() -> ... -> rtw_enter_ips() -> rtw_core_stop() ->
cancel_work_sync(&rtwdev->fw_recovery_work) /* wait for self to finish */


It would be safe to add this cancel_work_sync(&rtwdev->fw_recovery_work)
in rtw_core_deinit()?

So, NACK.

Ping-Ke