diff options
| author | Jingxiang Ge <jge@codeaurora.org> | 2018-01-04 15:14:04 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-01-08 18:45:27 -0800 |
| commit | 4f4e8cf4bc5d69480bfeeff2859df3616e3eaec4 (patch) | |
| tree | 715e03fa0ec0ed23a11488f098ce91640130fa49 | |
| parent | 2bbc469290177e14fef2150035a6d0fceab8c668 (diff) | |
qcacld-2.0: Reset variables for nbuf alloc when driver exit
The variables for nbuf alloc are not reset when calling
destory function, The adf_net_buf_debug_init will fail
in the following hdd_driver_init. The issue happens for
inkernel mode driver.
Reset variables to NULL or 0 once destory nbuf done.
Change-Id: Ia2815e3891b1a6483f7ff136eceea74b06030f7c
CRs-Fixed: 2168139
| -rw-r--r-- | CORE/SERVICES/COMMON/adf/adf_nbuf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CORE/SERVICES/COMMON/adf/adf_nbuf.c b/CORE/SERVICES/COMMON/adf/adf_nbuf.c index 58a68c5940cf..6f45f72687f1 100644 --- a/CORE/SERVICES/COMMON/adf/adf_nbuf.c +++ b/CORE/SERVICES/COMMON/adf/adf_nbuf.c @@ -1440,6 +1440,13 @@ static void adf_nbuf_track_memory_manager_destroy(void) adf_print("%s: %d unfreed tracking memory still in use", __func__, adf_net_buf_track_used_list_count); + adf_net_buf_track_free_list = NULL; + adf_net_buf_track_free_list_count = 0; + adf_net_buf_track_used_list_count = 0; + adf_net_buf_track_max_used = 0; + adf_net_buf_track_max_free = 0; + adf_net_buf_track_max_allocated = 0; + spin_unlock_irqrestore(&adf_net_buf_track_free_list_lock, irq_flag); kmem_cache_destroy(nbuf_tracking_cache); } |
