From 69d7d490abcd713977896e470e368015de6c17e2 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Mon, 13 Feb 2017 21:48:16 -0800 Subject: [PATCH] qcacld-3.0: Enable object manager reference count debug feature Object manager provides reference count infrastructure for all 4 common objects: psoc, pdev, vdev and peer. Reference count APIs provide protection from use after free scenarios by making sure reference counted object is not freed prematurely while its still in use. Reference count usage requires certain set of disciplines from components for example: 1) A component 'C' is responsible for all its reference count 2) A component 'B' can't release reference count of a common object taken by component 'A' 3) A component can't release a reference count which it has not taken. Enable reference count debug infrastructure such that wrong APIs usage can be detected and fixed properly. Change-Id: I7a5b92fe00a060eee15b74572d2624197b331894 CRs-Fixed: 2006322 --- Kbuild | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Kbuild b/Kbuild index 98c226e2dcb8..29ba6a65716e 100644 --- a/Kbuild +++ b/Kbuild @@ -1406,6 +1406,9 @@ ifeq ($(CONFIG_WLAN_POWER_DEBUGFS), y) CDEFINES += -DWLAN_POWER_DEBUGFS endif +# Enable object manager reference count debug infrastructure +CDEFINES += -DWLAN_OBJMGR_DEBUG + ifeq ($(BUILD_DIAG_VERSION),1) CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_CSR