mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Check vdevs in hdd_check_for_leaks
Before checking for other kinds of resources leaks, check to ensure all objmgr vdevs have been properly freed. Change-Id: Ie30daf22834ceb4a8ce19fbd1d4c9b231d3b70d4 CRs-Fixed: 2255511
This commit is contained in:
parent
3618a75273
commit
a6246dd4e5
1 changed files with 6 additions and 4 deletions
|
|
@ -2602,6 +2602,7 @@ static void hdd_nan_register_callbacks(struct hdd_context *hdd_ctx)
|
|||
#ifdef CONFIG_LEAK_DETECTION
|
||||
/**
|
||||
* hdd_check_for_leaks() - Perform runtime memory leak checks
|
||||
* @hdd_ctx: the global HDD context
|
||||
*
|
||||
* This API triggers runtime memory leak detection. This feature enforces the
|
||||
* policy that any memory allocated at runtime must also be released at runtime.
|
||||
|
|
@ -2613,10 +2614,11 @@ static void hdd_nan_register_callbacks(struct hdd_context *hdd_ctx)
|
|||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void hdd_check_for_leaks(void)
|
||||
static void hdd_check_for_leaks(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
/* DO NOT REMOVE these checks; for false positives, read above first */
|
||||
|
||||
wlan_objmgr_psoc_check_for_vdev_leaks(hdd_ctx->hdd_psoc);
|
||||
qdf_mc_timer_check_for_leaks();
|
||||
qdf_nbuf_map_check_for_leaks();
|
||||
qdf_mem_check_for_leaks();
|
||||
|
|
@ -2624,7 +2626,7 @@ static void hdd_check_for_leaks(void)
|
|||
|
||||
#define hdd_debug_domain_set(domain) qdf_debug_domain_set(domain)
|
||||
#else
|
||||
static inline void hdd_check_for_leaks(void) {}
|
||||
static inline void hdd_check_for_leaks(struct hdd_context *hdd_ctx) { }
|
||||
|
||||
#define hdd_debug_domain_set(domain)
|
||||
#endif /* CONFIG_LEAK_DETECTION */
|
||||
|
|
@ -2875,7 +2877,7 @@ release_lock:
|
|||
}
|
||||
/* many adapter resources are not freed by design in SSR case */
|
||||
if (!reinit)
|
||||
hdd_check_for_leaks();
|
||||
hdd_check_for_leaks(hdd_ctx);
|
||||
hdd_debug_domain_set(QDF_DEBUG_DOMAIN_INIT);
|
||||
|
||||
hdd_exit();
|
||||
|
|
@ -10633,7 +10635,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
|
|||
|
||||
/* many adapter resources are not freed by design in SSR case */
|
||||
if (!is_recovery_stop)
|
||||
hdd_check_for_leaks();
|
||||
hdd_check_for_leaks(hdd_ctx);
|
||||
hdd_debug_domain_set(QDF_DEBUG_DOMAIN_INIT);
|
||||
|
||||
/* Once the firmware sequence is completed reset this flag */
|
||||
|
|
|
|||
Loading…
Reference in a new issue