Public bug reported:

[Impact]
ath11k is in deadlock when stress reboot or suspend on WCN6855.
sometimes kernel hang.

Aug 19 01:29:28 Thor-P3-AMD-2 kernel: Call Trace:
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: <TASK>
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: __schedule+0x240/0x5a0
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? resched_curr+0x52/0xc0
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: schedule+0x55/0xd0
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: schedule_timeout+0x115/0x150
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? raw_spin_rq_unlock+0x10/0x30
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? try_to_wake_up+0x211/0x600
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? ath11k_ce_send+0x17a/0x2e0 [ath11k]
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: wait_for_completion+0x8b/0xf0
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: __flush_work.isra.0+0x171/0x270
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? flush_workqueue_prep_pwqs+0x140/0x140
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: __cancel_work_timer+0x11b/0x1a0
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? 
ath11k_mac_config_mon_status_default+0xcc/0x170 [ath11k]
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: cancel_work_sync+0x10/0x20
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ath11k_mac_op_stop+0x9f/0x1e0 [ath11k]
Aug 19 01:29:28 Thor-P3-AMD-2 kernel: drv_stop+0x45/0x110 [mac80211]

[Fix]
Fix this by switching from using regulatory_set_wiphy_regd_sync() to
regulatory_set_wiphy_regd(). Now cfg80211 will schedule another workqueue which
handles the locking on it's own. So the ath11k workqueue can simply exit without
taking any locks, avoiding the deadlock.

[Test]
Verified on hardware, stress reboot and suspend 30 times OK.

[Where problems could occur]
It may break ath11k wifi driver.

** Affects: hwe-next
     Importance: Undecided
     Assignee: AaronMa (mapengyu)
         Status: In Progress

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: In Progress

** Affects: linux-oem-5.17 (Ubuntu)
     Importance: Undecided
         Status: In Progress

** Affects: linux-oem-6.0 (Ubuntu)
     Importance: Undecided
         Status: In Progress

** Affects: linux (Ubuntu Jammy)
     Importance: Undecided
         Status: In Progress

** Affects: linux-oem-5.17 (Ubuntu Jammy)
     Importance: Undecided
         Status: In Progress

** Affects: linux-oem-6.0 (Ubuntu Jammy)
     Importance: Undecided
         Status: In Progress

** Affects: linux (Ubuntu Kinetic)
     Importance: Undecided
         Status: In Progress

** Affects: linux-oem-5.17 (Ubuntu Kinetic)
     Importance: Undecided
         Status: In Progress

** Affects: linux-oem-6.0 (Ubuntu Kinetic)
     Importance: Undecided
         Status: In Progress


** Tags: oem-priority originate-from-1981178 sutton

** Tags added: oem-priority originate-from-1981178 sutton

** Also affects: linux (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: linux (Ubuntu Kinetic)
   Importance: Undecided
       Status: New

** Also affects: linux-oem-5.17 (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: linux-oem-6.0 (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: hwe-next
     Assignee: (unassigned) => AaronMa (mapengyu)

** Changed in: linux (Ubuntu Jammy)
       Status: New => In Progress

** Changed in: linux (Ubuntu Kinetic)
       Status: New => In Progress

** Changed in: linux (Ubuntu)
       Status: New => In Progress

** Changed in: linux-oem-5.17 (Ubuntu)
       Status: New => In Progress

** Changed in: linux-oem-5.17 (Ubuntu Jammy)
       Status: New => In Progress

** Changed in: linux-oem-5.17 (Ubuntu Kinetic)
       Status: New => In Progress

** Changed in: linux-oem-6.0 (Ubuntu)
       Status: New => In Progress

** Changed in: linux-oem-6.0 (Ubuntu Jammy)
       Status: New => In Progress

** Changed in: linux-oem-6.0 (Ubuntu Kinetic)
       Status: New => In Progress

** Changed in: hwe-next
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1995041

Title:
  Fix ath11k deadlock on WCN6855

Status in HWE Next:
  In Progress
Status in linux package in Ubuntu:
  In Progress
Status in linux-oem-5.17 package in Ubuntu:
  In Progress
Status in linux-oem-6.0 package in Ubuntu:
  In Progress
Status in linux source package in Jammy:
  In Progress
Status in linux-oem-5.17 source package in Jammy:
  In Progress
Status in linux-oem-6.0 source package in Jammy:
  In Progress
Status in linux source package in Kinetic:
  In Progress
Status in linux-oem-5.17 source package in Kinetic:
  In Progress
Status in linux-oem-6.0 source package in Kinetic:
  In Progress

Bug description:
  [Impact]
  ath11k is in deadlock when stress reboot or suspend on WCN6855.
  sometimes kernel hang.

  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: Call Trace:
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: <TASK>
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: __schedule+0x240/0x5a0
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? resched_curr+0x52/0xc0
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: schedule+0x55/0xd0
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: schedule_timeout+0x115/0x150
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? raw_spin_rq_unlock+0x10/0x30
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? try_to_wake_up+0x211/0x600
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? ath11k_ce_send+0x17a/0x2e0 [ath11k]
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: wait_for_completion+0x8b/0xf0
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: __flush_work.isra.0+0x171/0x270
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? flush_workqueue_prep_pwqs+0x140/0x140
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: __cancel_work_timer+0x11b/0x1a0
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ? 
ath11k_mac_config_mon_status_default+0xcc/0x170 [ath11k]
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: cancel_work_sync+0x10/0x20
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: ath11k_mac_op_stop+0x9f/0x1e0 [ath11k]
  Aug 19 01:29:28 Thor-P3-AMD-2 kernel: drv_stop+0x45/0x110 [mac80211]

  [Fix]
  Fix this by switching from using regulatory_set_wiphy_regd_sync() to
  regulatory_set_wiphy_regd(). Now cfg80211 will schedule another workqueue 
which
  handles the locking on it's own. So the ath11k workqueue can simply exit 
without
  taking any locks, avoiding the deadlock.

  [Test]
  Verified on hardware, stress reboot and suspend 30 times OK.

  [Where problems could occur]
  It may break ath11k wifi driver.

To manage notifications about this bug go to:
https://bugs.launchpad.net/hwe-next/+bug/1995041/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to