diff options
author | Govind Singh <govinds@codeaurora.org> | 2020-09-29 20:15:36 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-10-01 22:31:11 +0300 |
commit | 87e8497a7d46a05574cb7cca25eabf3a3221093e (patch) | |
tree | 3f5970bad12b01aa9af2d53ada95530ff60b5b99 /drivers/net/wireless/ath/ath11k/dp_rx.h | |
parent | 6a8be1baa9116a038cb4f6158cc10134387ca0d0 (diff) | |
download | linux-87e8497a7d46a05574cb7cca25eabf3a3221093e.tar.xz |
ath11k: Use GFP_ATOMIC instead of GFP_KERNEL in idr_alloc
With SLUB DEBUG CONFIG below crash is seen as kmem_cache_alloc
is being called in non-atomic context.
To fix this issue, use GFP_ATOMIC instead of GFP_KERNEL in idr_alloc.
BUG: sleeping function called from invalid context at mm/slab.h:393
[ 59.805451] Call trace:
[ 59.807971] ___might_sleep+0x110/0x118
[ 59.811915] __might_sleep+0x50/0x84
[ 59.815593] kmem_cache_alloc+0x60/0x3e0
[ 59.819630] radix_tree_node_alloc+0x4c/0xe8
[ 59.824014] radix_tree_extend+0x8c/0x164
[ 59.828135] idr_get_free_cmn+0xa4/0x27c
[ 59.832167] idr_alloc_cmn+0x70/0xe8
[ 59.835856] ath11k_dp_rxbufs_replenish+0x1e8/0x310 [ath11k]
[ 59.841687] ath11k_dp_rxdma_ring_buf_setup+0x50/0x60 [ath11k]
[ 59.847693] ath11k_dp_rx_pdev_alloc+0x260/0x4d8 [ath11k]
[ 59.853248] ath11k_dp_pdev_alloc+0x40/0xc4 [ath11k]
[ 59.858357] ath11k_core_qmi_firmware_ready+0x3c4/0x490 [ath11k]
[ 59.864538] ath11k_qmi_driver_event_work+0x4c8/0x1178 [ath11k]
[ 59.870620] process_one_work+0x208/0x434
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Signed-off-by: Govind Singh <govinds@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1601399736-3210-9-git-send-email-kvalo@codeaurora.org
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/dp_rx.h')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/dp_rx.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.h b/drivers/net/wireless/ath/ath11k/dp_rx.h index 88bbcae14e34..fbea45f79c9b 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.h +++ b/drivers/net/wireless/ath/ath11k/dp_rx.h @@ -74,8 +74,7 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int mac_id, int ath11k_dp_rxbufs_replenish(struct ath11k_base *ab, int mac_id, struct dp_rxdma_ring *rx_ring, int req_entries, - enum hal_rx_buf_return_buf_manager mgr, - gfp_t gfp); + enum hal_rx_buf_return_buf_manager mgr); int ath11k_dp_htt_tlv_iter(struct ath11k_base *ab, const void *ptr, size_t len, int (*iter)(struct ath11k_base *ar, u16 tag, u16 len, const void *ptr, void *data), @@ -87,8 +86,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id, int ath11k_dp_rx_mon_status_bufs_replenish(struct ath11k_base *ab, int mac_id, struct dp_rxdma_ring *rx_ring, int req_entries, - enum hal_rx_buf_return_buf_manager mgr, - gfp_t gfp); + enum hal_rx_buf_return_buf_manager mgr); int ath11k_dp_rx_pdev_mon_detach(struct ath11k *ar); int ath11k_dp_rx_pdev_mon_attach(struct ath11k *ar); int ath11k_peer_rx_frag_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id); |