qcacld-3.0: Avoid taking lock for vfree API during driver load/unload
This is qcacld-2.0 to qcacld-3.0 propagation Avoid invoking vfree inside spinlock during logging service activation and deactivation. Since vfree is prone to sleep, this disables the IRQs for duration longer than the acceptable limit. vfree can be done without spin lock here, as there is no synchronization issue in this scenario. CRs-Fixed: 914363 Change-Id: I4d69431a98a4e4301dfc1e2b3b4c40c408a7ef99
This commit is contained in:

committed by
Satish Singh

parent
278d012c68
commit
f78b05e239
@@ -701,10 +701,10 @@ int wlan_logging_sock_activate_svc(int log_fe_to_console, int num_buf)
|
|||||||
pr_err("%s: Could not Create LogMsg Thread Controller",
|
pr_err("%s: Could not Create LogMsg Thread Controller",
|
||||||
__func__);
|
__func__);
|
||||||
spin_lock_irqsave(&gwlan_logging.spin_lock, irq_flag);
|
spin_lock_irqsave(&gwlan_logging.spin_lock, irq_flag);
|
||||||
vfree(gplog_msg);
|
|
||||||
gplog_msg = NULL;
|
|
||||||
gwlan_logging.pcur_node = NULL;
|
gwlan_logging.pcur_node = NULL;
|
||||||
spin_unlock_irqrestore(&gwlan_logging.spin_lock, irq_flag);
|
spin_unlock_irqrestore(&gwlan_logging.spin_lock, irq_flag);
|
||||||
|
vfree(gplog_msg);
|
||||||
|
gplog_msg = NULL;
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
wake_up_process(gwlan_logging.thread);
|
wake_up_process(gwlan_logging.thread);
|
||||||
@@ -740,10 +740,10 @@ int wlan_logging_sock_deactivate_svc(void)
|
|||||||
wait_for_completion(&gwlan_logging.shutdown_comp);
|
wait_for_completion(&gwlan_logging.shutdown_comp);
|
||||||
|
|
||||||
spin_lock_irqsave(&gwlan_logging.spin_lock, irq_flag);
|
spin_lock_irqsave(&gwlan_logging.spin_lock, irq_flag);
|
||||||
vfree(gplog_msg);
|
|
||||||
gplog_msg = NULL;
|
|
||||||
gwlan_logging.pcur_node = NULL;
|
gwlan_logging.pcur_node = NULL;
|
||||||
spin_unlock_irqrestore(&gwlan_logging.spin_lock, irq_flag);
|
spin_unlock_irqrestore(&gwlan_logging.spin_lock, irq_flag);
|
||||||
|
vfree(gplog_msg);
|
||||||
|
gplog_msg = NULL;
|
||||||
|
|
||||||
pr_info("%s: Deactivate wlan_logging svc\n", __func__);
|
pr_info("%s: Deactivate wlan_logging svc\n", __func__);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user