]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ath9k: fix sleeping in atomic context
authorMiaoqing Pan <miaoqing@codeaurora.org>
Mon, 9 Aug 2021 04:05:16 +0000 (12:05 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 09:18:53 +0000 (10:18 +0100)
commit2f32a212d7201dfe539f696afc04b3bc2a09d3b2
tree4603cf2ab0f2d77f78a6a8cca9e35fa02c6a8c8c
parent910dfdbf542b71f992d459318fed7dc6ea63eb53
ath9k: fix sleeping in atomic context

BugLink: https://bugs.launchpad.net/bugs/1947781
[ Upstream commit 7c48662b9d56666219f526a71ace8c15e6e12f1f ]

The problem is that gpio_free() can sleep and the cfg_soc() can be
called with spinlocks held. One problematic call tree is:

--> ath_reset_internal() takes &sc->sc_pcu_lock spin lock
   --> ath9k_hw_reset()
      --> ath9k_hw_gpio_request_in()
         --> ath9k_hw_gpio_request()
            --> ath9k_hw_gpio_cfg_soc()

Remove gpio_free(), use error message instead, so we should make sure
there is no GPIO conflict.

Also remove ath9k_hw_gpio_free() from ath9k_hw_apply_gpio_override(),
as gpio_mask will never be set for SOC chips.

Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1628481916-15030-1-git-send-email-miaoqing@codeaurora.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/wireless/ath/ath9k/hw.c