From e344f80463762610a30a0e0ddbc60b07b6783abd Mon Sep 17 00:00:00 2001 From: bings Date: Tue, 28 Jul 2020 10:36:39 +0800 Subject: [PATCH] qcacmn: Set lock_cookie_freelist as NULL in qdf_lock_stats_deinit lock_cookie_freelist is global static, which means it is set as NULL when loading driver module. It works well when there is only one driver module. For the CE platform with CONFIG_WLAN_RESIDENT_DRIVER defined, driver is split into two modules, one module keeps variables and functions in kernel, the other module is used to trigger rmmod/insmod function. In this case, lock_cookie_freelist is not NULL when insmod is triggered the second time through the second module. Set lock_cookie_freelist as NULL in qdf_lock_stats_deinit. Change-Id: Ia20fcc230c3a43eed9b646689348ad37b77811f2 CRs-Fixed: 2742118 --- qdf/linux/src/qdf_lock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qdf/linux/src/qdf_lock.c b/qdf/linux/src/qdf_lock.c index 57f4958e713a..328e0a0f0b91 100644 --- a/qdf/linux/src/qdf_lock.c +++ b/qdf/linux/src/qdf_lock.c @@ -830,6 +830,7 @@ void qdf_lock_stats_deinit(void) __func__, lock_cookies[i].u.cookie.func, lock_cookies[i].u.cookie.line); } + lock_cookie_freelist = NULL; } /* allocated separate memory in case the lock memory is freed without