Bug 216434

Summary: ath11k: Freezing kernel when doing s2idle [17cb:1103]
Product: Drivers Reporter: Bin Li (binli)
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: CLOSED CODE_FIX    
Severity: blocking CC: kvalo, mapengyu, mario.limonciello
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: v6.0-rc3 Subsystem:
Regression: No Bisected commit-id:
Attachments: journalct log when doing suspend
enable debug_mask

Description Bin Li 2022-09-01 07:09:19 UTC
Created attachment 301708 [details]
journalct log when doing suspend

On ubuntu 22.04, I installed v6.0-rc3 mainline kernel.
linux-firmware 20220329.git681281e4-0ubuntu3.4

Sep 01 13:25:13 u-ThinkPad-P16-Gen-1 kernel: PM: suspend entry (s2idle)
Sep 01 13:25:13 u-ThinkPad-P16-Gen-1 kernel: Filesystems sync: 0.004 seconds
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel: Freezing user space processes ...
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel: Freezing of tasks failed after 20.007 seconds (9 tasks refusing to freeze, wq_busy=0):
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel: task:NetworkManager  state:D stack:    0 pid:  988 ppid:     1 flags:0x00004006
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel: Call Trace:
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  <TASK>
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  __schedule+0x221/0x5c0
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  schedule+0x5f/0x100
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  schedule_timeout+0x111/0x150
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  wait_for_completion+0x88/0x140
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  __flush_work.isra.0+0x1b9/0x340
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  ? flush_workqueue_prep_pwqs+0x140/0x140
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  __cancel_work_timer+0x10d/0x190
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  ? ath11k_mac_config_mon_status_default+0x9c/0x170 [ath11k]
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  cancel_work_sync+0x10/0x20
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  ath11k_mac_op_stop+0x9f/0x1e0 [ath11k]
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  drv_stop+0x45/0x120 [mac80211]
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  ieee80211_stop_device+0x43/0x50 [mac80211]
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  ieee80211_do_stop+0x6b1/0x980 [mac80211]
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  ? cond_synchronize_rcu_expedited+0x40/0x40
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  ? qdisc_reset+0x27/0x150
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  ieee80211_stop+0x43/0x170 [mac80211]
Sep 01 13:25:33 u-ThinkPad-P16-Gen-1 kernel:  __dev_close_many+0x9f/0x120
Comment 1 Bin Li 2022-09-01 08:44:13 UTC
Created attachment 301709 [details]
enable debug_mask

echo 0xffffffff > /sys/module/ath11k/parameters/debug_mask
Comment 4 Mario Limonciello (AMD) 2022-11-02 21:47:36 UTC
It's being sent out for 6.1-rc.
https://patchwork.kernel.org/project/linux-wireless/patch/20221102114803.13485-1-kvalo@kernel.org/
Comment 5 Kalle Valo 2022-11-21 15:28:03 UTC
(In reply to Bin Li from comment #3)
> This patch could fix this issue.
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/drivers/
> net/wireless/ath/ath11k?id=d99884ad9e3673a12879bc2830f6e5a66cccbd78

Not sure the meaning of the word "could" here. Are you saying that the commit above fixed the issue and the bug report can be closed?
Comment 6 Bin Li 2022-11-22 02:42:34 UTC
@kalle,

 Yes, this issue is fixed. And it's in kernel tree now. Set is as CODE_FIX. Thanks! 

commit f45cb6b29cd36514e13f7519770873d8c0457008
Author: Wen Gong <quic_wgong@quicinc.com>
Date:   Wed Nov 2 13:48:03 2022 +0200

    wifi: ath11k: avoid deadlock during regulatory update in ath11k_regd_update()
    
    (cherry picked from commit d99884ad9e3673a12879bc2830f6e5a66cccbd78 in ath-next
    as users are seeing this bug more now, also cc stable)
Comment 7 Kalle Valo 2022-11-23 06:57:09 UTC
Thanks, closing the bug.