qcacmn: fix might sleep crash issue during rx buffer smmu mapping
When driver doing ipa rx buffer smmu mapping, qdf_spin_lock_bh is used to protect rx descriptor pool, but might sleep function is called by API ipa_is_ready. This causes kernel panic about sleeping function called from invalid context as following call trace: Call trace: ___might_sleep+0x204/0x208 __might_sleep+0x50/0x88 __mutex_lock_common+0x5c/0x1078 mutex_lock_nested+0x40/0x50 ipa3_is_ready+0x2c/0x60 ipa_is_ready+0x24/0x38 dp_ipa_handle_rx_buf_pool_smmu_mapping+0x2dc/0x6d0 [wlan] Move the ipa is ready check function call outside of spin lock. Change-Id: I5d3a79dff8a045791834733514a40f7c1ccb0d8b CRs-Fixed: 2839292
这个提交包含在:
@@ -101,9 +101,6 @@ static QDF_STATUS __dp_ipa_handle_buf_smmu_mapping(struct dp_soc *soc,
|
||||
{
|
||||
qdf_mem_info_t mem_map_table = {0};
|
||||
|
||||
if (!qdf_ipa_is_ready())
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
qdf_update_mem_map_table(soc->osdev, &mem_map_table,
|
||||
qdf_nbuf_get_frag_paddr(nbuf, 0),
|
||||
size);
|
||||
@@ -202,6 +199,9 @@ static QDF_STATUS dp_ipa_handle_rx_buf_pool_smmu_mapping(struct dp_soc *soc,
|
||||
struct dp_rx_desc *rx_desc;
|
||||
qdf_nbuf_t nbuf;
|
||||
|
||||
if (!qdf_ipa_is_ready())
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!qdf_mem_smmu_s1_enabled(soc->osdev))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
@@ -252,6 +252,9 @@ static QDF_STATUS dp_ipa_handle_rx_buf_pool_smmu_mapping(struct dp_soc *soc,
|
||||
qdf_nbuf_t nbuf;
|
||||
int i;
|
||||
|
||||
if (!qdf_ipa_is_ready())
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!qdf_mem_smmu_s1_enabled(soc->osdev))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户